本文整理汇总了Java中net.samagames.api.permissions.IPermissionsEntity类的典型用法代码示例。如果您正苦于以下问题:Java IPermissionsEntity类的具体用法?Java IPermissionsEntity怎么用?Java IPermissionsEntity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPermissionsEntity类属于net.samagames.api.permissions包,在下文中一共展示了IPermissionsEntity类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removePlayer
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
public void removePlayer(Player player)
{
this.playersIn.remove(player.getUniqueId());
this.playersCheckpoints.remove(player.getUniqueId());
player.getInventory().clear();
this.hub.getPlayerManager().getStaticInventory().setInventoryToPlayer(player);
IPermissionsEntity permissionsEntity = SamaGamesAPI.get().getPermissionsManager().getPlayer(player.getUniqueId());
if (permissionsEntity.hasPermission("network.vipplus") && SamaGamesAPI.get().getSettingsManager().getSettings(player.getUniqueId()).isElytraActivated())
{
player.getInventory().setChestplate(new ItemStack(Material.ELYTRA));
this.hub.getPlayerManager().getStaticInventory().setInventoryToPlayer(player);
}
for (UUID playerIn : this.playersIn.keySet())
{
this.hub.getServer().getScheduler().runTask(this.hub, () ->
{
player.showPlayer(this.hub.getServer().getPlayer(playerIn));
this.hub.getServer().getPlayer(playerIn).showPlayer(player);
});
}
}
示例2: getColoredFormattedPlayerName
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
/**
* Get a colored formatted player name
*
* @param uuid Player's UUID
*
* @return Formatted name
*/
public static String getColoredFormattedPlayerName(UUID uuid)
{
AbstractPlayerData playerData = SamaGamesAPI.get().getPlayerManager().getPlayerData(uuid);
IPermissionsEntity playerPermissionEntity = SamaGamesAPI.get().getPermissionsManager().getPlayer(uuid);
return playerPermissionEntity.getDisplayPrefix() + playerData.getDisplayName() + ChatColor.RESET;
}
示例3: getFormattedRank
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
public static String getFormattedRank(UUID uuid, boolean overrideNickname)
{
IPermissionsEntity permissionsEntity = SamaGamesAPI.get().getPermissionsManager().getPlayer(uuid);
String prefix = overrideNickname ? permissionsEntity.getPrefix() : permissionsEntity.getDisplayPrefix();
String display = (overrideNickname ? permissionsEntity.getTag() : permissionsEntity.getDisplayTag()).replace("[", "").replace("]", "");
if (ChatColor.stripColor(display).isEmpty())
display = ChatColor.GRAY + "Joueur";
return prefix + display;
}
示例4: callbackGadget
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
public void callbackGadget(AbstractDisplayer displayer)
{
displayer.getBlocksUsed().keySet().forEach(this.blocksUsed::remove);
this.playersGadgets.remove(displayer.getPlayer().getUniqueId());
IPermissionsEntity permissionsEntity = SamaGamesAPI.get().getPermissionsManager().getPlayer(displayer.getPlayer().getUniqueId());
if (permissionsEntity.hasPermission("network.vipplus") && SamaGamesAPI.get().getSettingsManager().getSettings(displayer.getPlayer().getUniqueId()).isElytraActivated())
{
displayer.getPlayer().getInventory().setChestplate(new ItemStack(Material.ELYTRA));
this.hub.getPlayerManager().getStaticInventory().setInventoryToPlayer(displayer.getPlayer());
}
}
示例5: checkElytra
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
private boolean checkElytra(Player player)
{
IPermissionsEntity permissionsEntity = SamaGamesAPI.get().getPermissionsManager().getPlayer(player.getUniqueId());
if (!permissionsEntity.hasPermission("network.vipplus") || !SamaGamesAPI.get().getSettingsManager().getSettings(player.getUniqueId()).isElytraActivated())
{
player.getInventory().setChestplate(null);
this.hub.getPlayerManager().getStaticInventory().setInventoryToPlayer(player);
return false;
}
return true;
}
示例6: addConnectedPlayer
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
public void addConnectedPlayer(Player player)
{
IPermissionsEntity user = SamaGamesAPI.get().getPermissionsManager().getPlayer(player.getUniqueId());
String display = user.getDisplayTag();
if (display.length() < 5)
display += "Joueurs";
if (this.playersDetails.containsKey(display))
this.playersDetails.put(display, this.playersDetails.get(display) + 1);
else
this.playersDetails.put(display, 1);
}
示例7: getPrefix
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
@Override
public String getPrefix(IPermissionsEntity entity) {
String value = entity.getPrefix();
if (value == null)
return "";
value = value.replaceAll("&s", " ");
value = ChatColor.translateAlternateColorCodes('&', value);
return value;
}
示例8: getSuffix
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
@Override
public String getSuffix(IPermissionsEntity entity) {
String value = entity.getSuffix();
if (value == null)
return "";
value = value.replaceAll("&s", " ");
value = ChatColor.translateAlternateColorCodes('&', value);
return value;
}
示例9: getDisplay
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
@Override
public String getDisplay(IPermissionsEntity entity) {
String value = entity.getTag();
if (value == null)
return "";
value = value.replaceAll("&s", " ");
value = ChatColor.translateAlternateColorCodes('&', value);
return value;
}
示例10: hasPermission
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
@Override
public boolean hasPermission(IPermissionsEntity entity, String permission) {
return entity.hasPermission(permission);
}
示例11: getFullyFormattedPlayerName
import net.samagames.api.permissions.IPermissionsEntity; //导入依赖的package包/类
/**
* Get a fully formatted player name with
* rank and color
*
* @param uuid Player's UUID
*
* @return Formatted name
*/
public static String getFullyFormattedPlayerName(UUID uuid)
{
AbstractPlayerData playerData = SamaGamesAPI.get().getPlayerManager().getPlayerData(uuid);
IPermissionsEntity playerPermissionEntity = SamaGamesAPI.get().getPermissionsManager().getPlayer(uuid);
return playerPermissionEntity.getDisplayPrefix() + playerPermissionEntity.getDisplayTag() + playerData.getDisplayName() + ChatColor.RESET;
}