/**
  * Checks if the Player has Permission for this permission.
  *
  * @param permission to check
  * @return true if has, false if not.
  */
 public boolean hasPermission(String permission) {
   if (isOnline()) {
     return plugin.getPermissionManager().checkPermissionsSilent(getPlayer(), permission);
   } else {
     return plugin.getPermissionManager().checkPermissionsSilent(playerName, permission);
   }
 }
 public static void closeAndResync(Player player) {
   RacesAndClasses plugin = RacesAndClasses.getPlugin();
   new InventoryResync(player).runTaskLater(plugin, 2);
 }
 /**
  * Sets the Class of this player.
  *
  * @param container to set
  * @return true if worked
  */
 public boolean setClass(ClassContainer container) {
   return plugin.getClassManager().addPlayerToHolder(this, container.getDisplayName(), true);
 }
 /** Returns the Class of the Player */
 public ClassContainer getclass() {
   return (ClassContainer) plugin.getClassManager().getHolderOfPlayer(this);
 }
 /**
  * Returns the Race of the Player
  *
  * @return race
  */
 public RaceContainer getRace() {
   return (RaceContainer) plugin.getRaceManager().getHolderOfPlayer(this);
 }
 public RaCPlayer(UUID playerUUID, String playerName) {
   this.playerUUID = playerUUID;
   this.playerName = playerName;
   this.plugin = RacesAndClasses.getPlugin();
 }
 /**
  * Returns the Hotkey Inventory associated to this player.
  *
  * @return the associated HotKey Inv.
  */
 public HotKeyInventory getHotkeyInventory() {
   return plugin.getHotkeyManager().getInv(this);
 }
 public PlayerSkillTreeManager getSkillTreeManager() {
   return plugin.getPlayerManager().getContainer(this).getSkillTreeManager();
 }
 /**
  * Returns the PlayerPetmanager of the Player.
  *
  * @return the PlayerPetManager.
  */
 public PlayerPetManager getPlayerPetManager() {
   return plugin.getPlayerManager().getContainer(this).getPlayerPetManager();
 }
 /**
  * Returns the Health manager
  *
  * @return Health Manager.
  */
 public HealthManager getHealthManager() {
   return plugin.getPlayerManager().getContainer(this).getHealthManager();
 }
 /**
  * Returns the Scoreboard Manager of the player.
  *
  * @return the scoreboard Manager.
  */
 public PlayerRaCScoreboardManager getScoreboardManager() {
   return plugin.getPlayerManager().getContainer(this).getPlayerScoreboardManager();
 }
 /**
  * Returns the ArrowManager of the Player
  *
  * @return the arrow manager
  */
 public ArrowManager getArrowManager() {
   return plugin.getPlayerManager().getContainer(this).getArrowManager();
 }
 /**
  * Returns the ActionBar of the Player
  *
  * @return the Actionbar Manager.
  */
 public PlayerActionBarDisplay getActionbarDisplay() {
   return plugin.getPlayerManager().getContainer(this).getActionbarDisplay();
 }
 /**
  * Returns the OwnManaManager of the Player.
  *
  * @return
  */
 public ManaManager getManaManager() {
   return plugin.getPlayerManager().getContainer(this).getSpellManager().getManaManager();
 }
 /**
  * Sets the new Current channel.
  *
  * @param newChannel to set.
  */
 public void setCurrentChatChannel(String newChannel) {
   plugin.getChannelManager().changeCurrentChannel(this, newChannel);
 }
 /**
  * Returns the current channel.
  *
  * @return current channel
  */
 public String getCurrentChatChannel() {
   return plugin.getChannelManager().getCurrentChannel(this);
 }