Program: 33802
Project: 33802
Buggy source:
@Override public boolean onCommand(final CommandSender sender,final Command command,final String label,final String[] split){
  if (!(sender instanceof Player)) {
    Util.sendMessage(sender,plugin.myLocale().errorUseInGame);
    return false;
  }
  final Player player=(Player)sender;
  if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islanderrorYouDoNotHavePermission);
    return true;
  }
  final UUID playerUUID=player.getUniqueId();
  if (playerUUID == null) {
    plugin.getLogger().severe("String_Node_Str" + sender.getName() + "String_Node_Str");
    Util.sendMessage(sender,ChatColor.RED + plugin.myLocale().errorCommandNotReady + "String_Node_Str");
    return true;
  }
  final UUID teamLeader=plugin.getPlayers().getTeamLeader(playerUUID);
  List<UUID> teamMembers=new ArrayList<UUID>();
  if (teamLeader != null) {
    teamMembers=plugin.getPlayers().getMembers(teamLeader);
  }
  if (split.length > 1 && split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
      String name=split[1];
      for (int i=2; i < split.length; i++) {
        name=name + "String_Node_Str" + split[i];
      }
      if (name.length() < Settings.minNameLength) {
        Util.sendMessage(player,ChatColor.RED + (plugin.myLocale(player.getUniqueId()).errorTooShort).replace("String_Node_Str",String.valueOf(Settings.minNameLength)));
        return true;
      }
      if (name.length() > Settings.maxNameLength) {
        Util.sendMessage(player,ChatColor.RED + (plugin.myLocale(player.getUniqueId()).errorTooLong).replace("String_Node_Str",String.valueOf(Settings.maxNameLength)));
        return true;
      }
      plugin.getGrid().setIslandName(playerUUID,ChatColor.translateAlternateColorCodes('&',name));
      Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).generalSuccess);
      return true;
    }
 else {
      Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
      return true;
    }
  }
  UUID targetPlayer=null;
switch (split.length) {
case 0:
    if (plugin.getPlayers().getIslandLocation(playerUUID) == null && !plugin.getPlayers().inTeam(playerUUID)) {
      if (Settings.maxIslands > 0 && plugin.getGrid().getIslandCount() > Settings.maxIslands) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorMaxIslands);
        return true;
      }
      if (plugin.getPlayers().getResetsLeft(playerUUID) == 0) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandResetNoMore);
        return true;
      }
      Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).islandnew);
      chooseIsland(player);
      return true;
    }
 else {
      if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().getControlPanel(playerUUID)) {
        Util.runCommand(player,Settings.ISLANDCOMMAND + "String_Node_Str");
      }
 else {
        if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
          Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
          return true;
        }
        if (!player.getWorld().getName().equalsIgnoreCase(Settings.worldName) || Settings.allowTeleportWhenFalling || !PlayerEvents.isFalling(playerUUID)|| (player.isOp() && !Settings.damageOps)) {
          plugin.getGrid().homeTeleport(player);
          if (Settings.islandRemoveMobs) {
            plugin.getGrid().removeMobs(player.getLocation());
          }
        }
 else {
          Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
        }
      }
      return true;
    }
case 1:
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
      if (!plugin.getGrid().playerIsOnIsland(player)) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNotOnIsland);
        return true;
      }
      ItemStack item=player.getItemInHand();
      double multiplier=1;
      if (item != null && item.getType().isBlock()) {
        for (        PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
          if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
            String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
            if (spl.length > 1) {
              if (!NumberUtils.isDigits(spl[1])) {
                plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
              }
 else {
                multiplier=Math.max(multiplier,Integer.valueOf(spl[1]));
              }
            }
          }
          if (multiplier < 1) {
            multiplier=1;
          }
        }
        if (player.getLocation().getBlockY() < Settings.seaHeight) {
          multiplier*=Settings.underWaterMultiplier;
        }
        int value=0;
        if (Settings.blockValues.containsKey(item.getData())) {
          value=(int)((double)Settings.blockValues.get(item.getData()) * multiplier);
        }
 else         if (Settings.blockValues.containsKey(new MaterialData(item.getType()))) {
          value=(int)((double)Settings.blockValues.get(new MaterialData(item.getType())) * multiplier);
        }
        if (value > 0) {
          Util.sendMessage(player,ChatColor.GREEN + (plugin.myLocale(player.getUniqueId()).islandblockValue.replace("String_Node_Str",Util.prettifyText(item.getType().name())).replace("String_Node_Str",String.valueOf(value))));
        }
 else {
          Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).islandblockWorthless.replace("String_Node_Str",Util.prettifyText(item.getType().name())));
        }
      }
 else {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNotABlock);
      }
      return true;
    }
  }
 else   if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
      Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpName);
      return true;
    }
  }
 else   if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
      plugin.getGrid().setIslandName(playerUUID,null);
      Util.sendMessage(sender,plugin.myLocale().generalSuccess);
    }
    return true;
  }
if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpCoop);
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpUnCoop);
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpExpel);
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    if (!Settings.teamChat) {
      Util.sendMessage(player,ChatColor.RED + plugin.myLocale().errorUnknownCommand);
      return false;
    }
    if (plugin.getPlayers().inTeam(playerUUID)) {
      boolean online=false;
      for (      UUID teamMember : plugin.getPlayers().getMembers(playerUUID)) {
        if (!teamMember.equals(playerUUID) && plugin.getServer().getPlayer(teamMember) != null) {
          online=true;
        }
      }
      if (!online) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).teamChatNoTeamAround);
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).teamChatStatusOff);
        plugin.getChatListener().unSetPlayer(playerUUID);
        return true;
      }
      if (plugin.getChatListener().isTeamChat(playerUUID)) {
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).teamChatStatusOff);
        plugin.getChatListener().unSetPlayer(playerUUID);
      }
 else {
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).teamChatStatusOn);
        plugin.getChatListener().setPlayer(playerUUID);
      }
    }
 else {
      Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).teamChatNoTeam);
    }
  }
 else {
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
  }
  return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).adminInfoBannedPlayers + "String_Node_Str");
  List<UUID> bannedList=plugin.getPlayers().getBanList(playerUUID);
  if (bannedList.isEmpty()) {
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).banNone);
  }
 else {
    for (    UUID bannedPlayers : bannedList) {
      Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + plugin.getPlayers().getName(bannedPlayers));
    }
  }
  return true;
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(playerUUID).islandhelpBan);
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(playerUUID).islandhelpUnban);
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!pendingNewIslandSelection.contains(playerUUID)) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale().errorUnknownCommand);
  return false;
}
pendingNewIslandSelection.remove(playerUUID);
Island oldIsland=plugin.getGrid().getIsland(player.getUniqueId());
newIsland(player);
if (resettingIsland.contains(playerUUID)) {
  resettingIsland.remove(playerUUID);
  resetPlayer(player,oldIsland);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,"String_Node_Str" + label + "String_Node_Str");
  displayLocales(player);
}
 else {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  try {
    player.openInventory(plugin.getSettingsPanel().islandGuardPanel(player));
  }
 catch (  Exception e) {
    if (DEBUG)     e.printStackTrace();
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
  }
}
 else {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
  return true;
}
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
  return true;
}
 else {
  if (!island.isLocked()) {
    for (    Player target : plugin.getServer().getOnlinePlayers()) {
      if (target == null || target.hasMetadata("String_Node_Str") || target.isOp() || player.equals(target) || VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str"))       continue;
      if (plugin.getGrid().isOnIsland(player,target) && !CoopPlay.getInstance().getCoopPlayers(island.getCenter()).contains(target.getUniqueId())) {
        if (plugin.getPlayers().inTeam(target.getUniqueId()) || plugin.getPlayers().hasIsland(target.getUniqueId())) {
          plugin.getGrid().homeTeleport(target);
        }
 else {
          if (!target.performCommand(Settings.SPAWNCOMMAND)) {
            target.teleport(player.getWorld().getSpawnLocation());
          }
        }
        Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).expelExpelled);
        plugin.getLogger().info(player.getName() + "String_Node_Str" + target.getName()+ "String_Node_Str");
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).expelSuccess.replace("String_Node_Str",target.getName()));
      }
    }
    Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).lockLocking);
    plugin.getMessages().tellOfflineTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerLocked.replace("String_Node_Str",player.getName()));
    plugin.getMessages().tellTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerLocked.replace("String_Node_Str",player.getName()));
    island.setLocked(true);
  }
 else {
    Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).lockUnlocking);
    plugin.getMessages().tellOfflineTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerUnlocked.replace("String_Node_Str",player.getName()));
    plugin.getMessages().tellTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerUnlocked.replace("String_Node_Str",player.getName()));
    island.setLocked(false);
  }
  return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
  return true;
}
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoIsland);
  return true;
}
plugin.getGrid().homeTeleport(player);
if (Settings.islandRemoveMobs) {
  plugin.getGrid().removeMobs(player.getLocation());
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str" + ChatColor.GREEN+ plugin.getDescription().getName()+ ChatColor.GOLD+ "String_Node_Str"+ ChatColor.AQUA+ plugin.getDescription().getVersion()+ ChatColor.GOLD+ "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (ControlPanel.controlPanel.containsKey(ControlPanel.getDefaultPanelName())) {
  player.openInventory(ControlPanel.controlPanel.get(ControlPanel.getDefaultPanelName()));
  return true;
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorCommandNotReady);
  plugin.getLogger().severe("String_Node_Str");
  return true;
}
}
}
if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (Settings.useEconomy && Settings.useMinishop) {
if (plugin.getGrid().getIsland(player.getUniqueId()) == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
if (player.getWorld().equals(ASkyBlock.getIslandWorld()) || player.getWorld().equals(ASkyBlock.getNetherWorld())) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  if (ControlPanel.miniShop != null) {
    player.openInventory(ControlPanel.miniShop);
  }
 else {
    Util.sendMessage(player,plugin.myLocale(playerUUID).errorCommandNotReady);
    plugin.getLogger().severe("String_Node_Str");
  }
  return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorWrongWorld);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorMinishopDisabled);
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpWarp);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Collection<UUID> warpList=plugin.getWarpSignsListener().listWarps();
if (warpList.isEmpty()) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpserrorNoWarpsYet);
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getGrid().playerIsOnIsland(player)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
return true;
}
 else {
if (Settings.useWarpPanel) {
player.openInventory(plugin.getWarpPanel().getWarpPanel(0));
}
 else {
Boolean hasWarp=false;
String wlist="String_Node_Str";
for (UUID w : warpList) {
  if (w == null)   continue;
  if (wlist.isEmpty()) {
    wlist=plugin.getPlayers().getName(w);
  }
 else {
    wlist+="String_Node_Str" + plugin.getPlayers().getName(w);
  }
  if (w.equals(playerUUID)) {
    hasWarp=true;
  }
}
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpswarpsAvailable + "String_Node_Str"+ ChatColor.WHITE+ wlist);
if (!hasWarp && (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str"))) {
  Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
}
return true;
}
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
if (!plugin.getPlayers().hasIsland(playerUUID)) {
Util.runCommand(player,Settings.ISLANDCOMMAND);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
if (!plugin.getPlayers().getTeamLeader(playerUUID).equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandresetOnlyOwner);
}
 else {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandresetMustRemovePlayers);
}
return true;
}
if (plugin.getPlayers().getResetsLeft(playerUUID) == 0) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandResetNoMore);
return true;
}
if (plugin.getPlayers().getResetsLeft(playerUUID) > 0) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).resetYouHave.replace("String_Node_Str",String.valueOf(plugin.getPlayers().getResetsLeft(playerUUID))));
}
if (!onRestartWaitTime(player) || Settings.resetWait == 0 || player.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandresetConfirm.replace("String_Node_Str",String.valueOf(Settings.resetConfirmWait)));
if (!confirm.containsKey(playerUUID) || !confirm.get(playerUUID)) {
confirm.put(playerUUID,true);
plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
@Override public void run(){
  confirm.put(playerUUID,false);
}
}
,(Settings.resetConfirmWait * 20));
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandresetWait.replace("String_Node_Str",String.valueOf(getResetWaitTime(player))));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (confirm.containsKey(playerUUID) && confirm.get(playerUUID)) {
confirm.remove(playerUUID);
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandresetPleaseWait);
if (plugin.getPlayers().getResetsLeft(playerUUID) == 0) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandResetNoMore);
}
if (plugin.getPlayers().getResetsLeft(playerUUID) > 0) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).resetYouHave.replace("String_Node_Str",String.valueOf(plugin.getPlayers().getResetsLeft(playerUUID))));
}
List<Schematic> schems=getSchematics(player,false);
Island oldIsland=plugin.getGrid().getIsland(player.getUniqueId());
if (schems.isEmpty()) {
newIsland(player);
resetPlayer(player,oldIsland);
}
 else if (schems.size() == 1) {
newIsland(player,schems.get(0));
resetPlayer(player,oldIsland);
}
 else {
if (Settings.useSchematicPanel) {
pendingNewIslandSelection.add(playerUUID);
resettingIsland.add(playerUUID);
player.openInventory(plugin.getSchematicsPanel().getPanel(player));
}
 else {
schems=getSchematics(player,true);
if (schems.isEmpty()) {
  newIsland(player);
}
 else if (Settings.chooseIslandRandomly) {
  newIsland(player,schems.get(random.nextInt(schems.size())));
}
 else {
  newIsland(player,schems.get(0));
}
resetPlayer(player,oldIsland);
}
}
return true;
}
 else {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpRestart);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (plugin.getGrid().getIsland(player.getUniqueId()) == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
plugin.getGrid().homeSet(player);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + plugin.myLocale(player.getUniqueId()).helpHeader.replace("String_Node_Str",plugin.getDescription().getName()).replace("String_Node_Str",plugin.getDescription().getVersion()));
if (Settings.useControlPanel) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpControlPanel);
}
 else {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpIsland);
}
int maxHomes=Settings.maxHomes;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
maxHomes=Settings.maxHomes;
break;
}
 else {
String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
if (spl.length > 1) {
  if (!NumberUtils.isDigits(spl[1])) {
    plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
  }
 else {
    maxHomes=Math.max(maxHomes,Integer.valueOf(spl[1]));
  }
}
}
}
if (maxHomes < 1) {
maxHomes=1;
}
}
if (maxHomes > 1 && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ maxHomes+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTeleport);
}
 else if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTeleport);
}
if (plugin.getGrid() != null && plugin.getGrid().getSpawn() != null && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpSpawn);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpControlPanel);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpRestart);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (maxHomes > 1) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ maxHomes+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpSetHome);
}
 else {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpSetHome);
}
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpLevel);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpLevelPlayer);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpName);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTop);
}
if (Settings.useEconomy && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpMiniShop);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpValue);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpWarps);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpWarp);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTeam);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpInvite);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpLeave);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpKick);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpAcceptReject);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpMakeLeader);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).teamChatHelp);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpBiome);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpExpel);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpBan);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpBanList);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpUnban);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpCoop);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpUnCoop);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpListCoops);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpLock);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpResetName);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpSettings);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + plugin.myLocale(player.getUniqueId()).islandHelpChallenges);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpSelectLanguage);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
Island island=plugin.getGrid().getIsland(playerUUID);
boolean none=true;
for (UUID uuid : CoopPlay.getInstance().getCoopPlayers(island.getCenter())) {
Util.sendMessage(player,ChatColor.GREEN + plugin.getPlayers().getName(uuid));
none=false;
}
if (none) {
Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpCoop);
}
 else {
Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + plugin.myLocale(playerUUID).coopUseExpel);
}
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (teamLeader != null && !teamLeader.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).levelerrornotYourIsland);
return true;
}
if (!plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
if (!plugin.getGrid().playerIsOnIsland(player)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).challengeserrorNotOnIsland);
return true;
}
if (plugin.getPlayers().getIslandLocation(playerUUID).getWorld().getEnvironment().equals(Environment.NETHER)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorWrongWorld);
return true;
}
Inventory inv=plugin.getBiomes().getBiomePanel(player);
if (inv != null) {
player.openInventory(inv);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") && plugin.getGrid().getSpawn() != null) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Location l=ASkyBlock.getIslandWorld().getSpawnLocation();
l.add(new Vector(0.5,0,0.5));
Island spawn=plugin.getGrid().getSpawn();
if (spawn != null && spawn.getSpawnPoint() != null) {
l=spawn.getSpawnPoint();
}
player.teleport(l);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
TopTen.topTenShow(player);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID) && !plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
 else {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).topTenerrorExcluded.replace("String_Node_Str",Settings.PERMPREFIX + "String_Node_Str"));
}
calculateIslandLevel(player,playerUUID);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).invitehelp);
if (plugin.getPlayers().inTeam(playerUUID)) {
if (teamLeader.equals(playerUUID)) {
int maxSize=Settings.maxTeamSize;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
  if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
    if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
      maxSize=Settings.maxTeamSize;
      break;
    }
 else {
      String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
      if (spl.length > 1) {
        if (!NumberUtils.isDigits(spl[1])) {
          plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
        }
 else {
          maxSize=Math.max(maxSize,Integer.valueOf(spl[1]));
        }
      }
    }
  }
  if (maxSize < 1) {
    maxSize=1;
  }
}
if (teamMembers.size() < maxSize) {
  Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteyouCanInvite.replace("String_Node_Str",String.valueOf(maxSize - teamMembers.size())));
}
 else {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYourIslandIsFull);
}
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
return true;
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (coopInviteList.containsKey(playerUUID)) {
Player inviter=plugin.getServer().getPlayer(coopInviteList.get(playerUUID));
if (inviter == null || !inviter.isOnline()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorOfflinePlayer);
coopInviteList.remove(playerUUID);
return true;
}
if (CoopPlay.getInstance().addCoopPlayer(inviter,player)) {
Util.sendMessage(inviter,ChatColor.GREEN + plugin.myLocale(inviter.getUniqueId()).coopSuccess.replace("String_Node_Str",player.getName()));
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).coopMadeYouCoop.replace("String_Node_Str",inviter.getName()));
}
setResetWaitTime(player);
coopInviteList.remove(playerUUID);
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID) && inviteList.containsKey(playerUUID)) {
if (plugin.getPlayers().hasIsland(playerUUID)) {
plugin.getLogger().info(player.getName() + "String_Node_Str");
plugin.deletePlayerIsland(playerUUID,true);
plugin.getLogger().info("String_Node_Str");
}
addPlayertoTeam(playerUUID,inviteList.get(playerUUID));
if (!plugin.getPlayers().inTeam(inviteList.get(playerUUID))) {
addPlayertoTeam(inviteList.get(playerUUID),inviteList.get(playerUUID));
}
setResetWaitTime(player);
if (Settings.teamJoinDeathReset) {
plugin.getPlayers().setDeaths(player.getUniqueId(),0);
}
plugin.getGrid().homeTeleport(player);
plugin.resetPlayer(player);
if (!player.hasPermission(Settings.PERMPREFIX + "String_Node_Str")) {
runCommands(Settings.teamStartCommands,player);
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).inviteyouHaveJoinedAnIsland);
if (plugin.getServer().getPlayer(inviteList.get(playerUUID)) != null) {
Util.sendMessage(plugin.getServer().getPlayer(inviteList.get(playerUUID)),ChatColor.GREEN + plugin.myLocale(inviteList.get(playerUUID)).invitehasJoinedYourIsland.replace("String_Node_Str",player.getName()));
}
inviteList.remove(player.getUniqueId());
plugin.getGrid().saveGrid();
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (coopInviteList.containsKey(playerUUID)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(playerUUID).rejectyouHaveRejectedInvitation);
if (Bukkit.getPlayer(inviteList.get(playerUUID)) != null) {
Util.sendMessage(Bukkit.getPlayer(inviteList.get(playerUUID)),ChatColor.RED + plugin.myLocale(inviteList.get(playerUUID)).rejectnameHasRejectedInvite.replace("String_Node_Str",player.getName()));
}
coopInviteList.remove(playerUUID);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).rejectyouHaveNotBeenInvited);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (inviteList.containsKey(player.getUniqueId())) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(playerUUID).rejectyouHaveRejectedInvitation);
if (Bukkit.getPlayer(inviteList.get(player.getUniqueId())) != null) {
Util.sendMessage(Bukkit.getPlayer(inviteList.get(playerUUID)),ChatColor.RED + plugin.myLocale(inviteList.get(playerUUID)).rejectnameHasRejectedInvite.replace("String_Node_Str",player.getName()));
}
inviteList.remove(playerUUID);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).rejectyouHaveNotBeenInvited);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (player.getWorld().equals(ASkyBlock.getIslandWorld()) || (Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null && player.getWorld().equals(ASkyBlock.getNetherWorld()))) {
if (plugin.getPlayers().inTeam(playerUUID)) {
if (plugin.getPlayers().getTeamLeader(playerUUID) != null && plugin.getPlayers().getTeamLeader(playerUUID).equals(playerUUID)) {
  Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).leaveerrorYouAreTheLeader);
  return true;
}
if (!leavingPlayers.contains(playerUUID)) {
  leavingPlayers.add(playerUUID);
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).leaveWarning);
  new BukkitRunnable(){
    @Override public void run(){
      if (leavingPlayers.contains(playerUUID)) {
        leavingPlayers.remove(playerUUID);
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).leaveCanceled);
      }
    }
  }
.runTaskLater(plugin,Settings.resetConfirmWait * 20L);
  return true;
}
leavingPlayers.remove(playerUUID);
if (!removePlayerFromTeam(playerUUID,teamLeader)) {
  return true;
}
CoopPlay.getInstance().clearMyInvitedCoops(player);
CoopPlay.getInstance().clearMyCoops(player);
plugin.getPlayers().startInviteCoolDownTimer(playerUUID,plugin.getPlayers().getTeamIslandLocation(teamLeader));
plugin.getWarpSignsListener().removeWarp(playerUUID);
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).leaveyouHaveLeftTheIsland);
if (plugin.getServer().getPlayer(teamLeader) != null) {
  Player leader=plugin.getServer().getPlayer(teamLeader);
  Util.sendMessage(leader,ChatColor.RED + plugin.myLocale(teamLeader).leavenameHasLeftYourIsland.replace("String_Node_Str",player.getName()));
}
 else {
  plugin.getMessages().setMessage(teamLeader,ChatColor.RED + plugin.myLocale(teamLeader).leavenameHasLeftYourIsland.replace("String_Node_Str",player.getName()));
}
if (teamMembers.size() < 2) {
  if (!removePlayerFromTeam(teamLeader,teamLeader)) {
    return true;
  }
}
plugin.resetPlayer(player);
if (!player.performCommand(Settings.SPAWNCOMMAND)) {
  player.teleport(player.getWorld().getSpawnLocation());
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).leaveerrorYouCannotLeaveIsland);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).leaveerrorYouMustBeInWorld);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (plugin.getPlayers().inTeam(playerUUID)) {
if (teamLeader.equals(playerUUID)) {
int maxSize=Settings.maxTeamSize;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
  if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
    maxSize=Settings.maxTeamSize;
    break;
  }
 else {
    String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
    if (spl.length > 1) {
      if (!NumberUtils.isDigits(spl[1])) {
        plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
      }
 else {
        maxSize=Math.max(maxSize,Integer.valueOf(spl[1]));
      }
    }
  }
}
if (maxSize < 1) {
  maxSize=1;
}
}
if (teamMembers.size() < maxSize) {
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteyouCanInvite.replace("String_Node_Str",String.valueOf(maxSize - teamMembers.size())));
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYourIslandIsFull);
}
}
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).teamlistingMembers + "String_Node_Str");
for (UUID m : plugin.getPlayers().getMembers(teamLeader)) {
Util.sendMessage(player,ChatColor.WHITE + plugin.getPlayers().getName(m));
}
}
 else if (inviteList.containsKey(playerUUID)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).invitenameHasInvitedYou.replace("String_Node_Str",plugin.getPlayers().getName(inviteList.get(playerUUID))));
Util.sendMessage(player,ChatColor.WHITE + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.YELLOW+ plugin.myLocale(player.getUniqueId()).invitetoAcceptOrReject);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNoTeam);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
break;
case 2:
if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (split[1].equalsIgnoreCase("String_Node_Str")) {
plugin.getPlayers().setControlPanel(playerUUID,true);
}
 else if (split[1].equalsIgnoreCase("String_Node_Str")) {
plugin.getPlayers().setControlPanel(playerUUID,false);
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).generalSuccess);
return true;
}
 else {
Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (Settings.useWarpPanel) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Set<UUID> warpList=plugin.getWarpSignsListener().listWarps();
if (warpList.isEmpty()) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpserrorNoWarpsYet);
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getGrid().playerIsOnIsland(player)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
return true;
}
 else {
int panelNum=0;
try {
panelNum=Integer.valueOf(split[1]) - 1;
}
 catch (Exception e) {
panelNum=0;
}
player.openInventory(plugin.getWarpPanel().getWarpPanel(panelNum));
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!pendingNewIslandSelection.contains(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
pendingNewIslandSelection.remove(playerUUID);
if (!schematics.containsKey(split[1])) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
 else {
Schematic schematic=schematics.get(split[1]);
if (schematic.getPerm().isEmpty() || VaultHelper.checkPerm(player,schematic.getPerm())) {
Island oldIsland=plugin.getGrid().getIsland(player.getUniqueId());
newIsland(player,schematic);
if (resettingIsland.contains(playerUUID)) {
resettingIsland.remove(playerUUID);
resetPlayer(player,oldIsland);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!NumberUtils.isDigits(split[1])) {
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
return true;
}
 else {
try {
int index=Integer.valueOf(split[1]);
if (index < 1 || index > plugin.getAvailableLocales().size()) {
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
return true;
}
for (ASLocale locale : plugin.getAvailableLocales().values()) {
if (locale.getIndex() == index) {
plugin.getPlayers().setLocale(playerUUID,locale.getLocaleName());
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).generalSuccess);
return true;
}
}
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
}
 catch (Exception e) {
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
}
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
int number=1;
try {
number=Integer.valueOf(split[1]);
if (number < 1) {
plugin.getGrid().homeTeleport(player,1);
}
 else {
int maxHomes=Settings.maxHomes;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
  maxHomes=Settings.maxHomes;
  break;
}
 else {
  String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
  if (spl.length > 1) {
    if (!NumberUtils.isDigits(spl[1])) {
      plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
    }
 else {
      maxHomes=Math.max(maxHomes,Integer.valueOf(spl[1]));
    }
  }
}
}
if (maxHomes < 1) {
maxHomes=1;
}
}
if (number > maxHomes) {
if (maxHomes > 1) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).setHomeerrorNumHomes.replace("String_Node_Str",String.valueOf(maxHomes)));
}
 else {
plugin.getGrid().homeTeleport(player,1);
}
}
 else {
plugin.getGrid().homeTeleport(player,number);
}
}
}
 catch (Exception e) {
plugin.getGrid().homeTeleport(player,1);
}
if (Settings.islandRemoveMobs) {
plugin.getGrid().removeMobs(player.getLocation());
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
int maxHomes=Settings.maxHomes;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
maxHomes=Settings.maxHomes;
break;
}
 else {
String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
if (spl.length > 1) {
if (!NumberUtils.isDigits(spl[1])) {
  plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
}
 else {
  maxHomes=Math.max(maxHomes,Integer.valueOf(spl[1]));
}
}
}
}
if (maxHomes < 1) {
maxHomes=1;
}
}
if (maxHomes > 1) {
int number=0;
try {
number=Integer.valueOf(split[1]);
if (number < 1 || number > maxHomes) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).setHomeerrorNumHomes.replace("String_Node_Str",String.valueOf(maxHomes)));
}
 else {
plugin.getGrid().homeSet(player,number);
}
}
 catch (Exception e) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).setHomeerrorNumHomes.replace("String_Node_Str",String.valueOf(maxHomes)));
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
final Set<UUID> warpList=plugin.getWarpSignsListener().listWarps();
if (warpList.isEmpty()) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpserrorNoWarpsYet);
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
 else {
UUID foundWarp=null;
for (UUID warp : warpList) {
if (warp == null) continue;
if (plugin.getPlayers().getName(warp) != null) {
if (plugin.getPlayers().getName(warp).toLowerCase().equals(split[1].toLowerCase())) {
foundWarp=warp;
break;
}
 else if (plugin.getPlayers().getName(warp).toLowerCase().startsWith(split[1].toLowerCase())) {
foundWarp=warp;
}
}
}
if (foundWarp == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorDoesNotExist);
return true;
}
 else {
final Location warpSpot=plugin.getWarpSignsListener().getWarp(foundWarp);
if (warpSpot == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorNotReadyYet);
plugin.getLogger().warning("String_Node_Str" + plugin.getPlayers().getName(foundWarp));
return true;
}
Island island=plugin.getGrid().getIslandAt(warpSpot);
if (island != null && plugin.getPlayers().isBanned(island.getOwner(),playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).banBanned.replace("String_Node_Str",plugin.getPlayers().getName(island.getOwner())));
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && !VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
return true;
}
}
if (island != null && island.isLocked() && !player.isOp() && !VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && !VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).lockIslandLocked);
if (!plugin.getGrid().locationIsAtHome(player,true,warpSpot)) {
return true;
}
}
boolean pvp=false;
if (island != null && ((warpSpot.getWorld().equals(ASkyBlock.getIslandWorld()) && island.getIgsFlag(SettingsFlag.PVP)) || (warpSpot.getWorld().equals(ASkyBlock.getNetherWorld()) && island.getIgsFlag(SettingsFlag.NETHER_PVP)))) {
pvp=true;
}
Block b=warpSpot.getBlock();
if (b.getType().equals(Material.SIGN_POST) || b.getType().equals(Material.WALL_SIGN)) {
Sign sign=(Sign)b.getState();
org.bukkit.material.Sign s=(org.bukkit.material.Sign)sign.getData();
BlockFace directionFacing=s.getFacing();
Location inFront=b.getRelative(directionFacing).getLocation();
Location oneDown=b.getRelative(directionFacing).getRelative(BlockFace.DOWN).getLocation();
if ((GridManager.isSafeLocation(inFront))) {
warpPlayer(player,inFront,foundWarp,directionFacing,pvp);
return true;
}
 else if (b.getType().equals(Material.WALL_SIGN) && GridManager.isSafeLocation(oneDown)) {
warpPlayer(player,oneDown,foundWarp,directionFacing,pvp);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorDoesNotExist);
plugin.getWarpSignsListener().removeWarp(warpSpot);
return true;
}
if (!(GridManager.isSafeLocation(warpSpot))) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorNotSafe);
if (b.getType().equals(Material.SIGN_POST)) {
plugin.getLogger().warning("String_Node_Str" + warpSpot.toString() + "String_Node_Str"+ plugin.getPlayers().getName(foundWarp));
}
return true;
}
 else {
final Location actualWarp=new Location(warpSpot.getWorld(),warpSpot.getBlockX() + 0.5D,warpSpot.getBlockY(),warpSpot.getBlockZ() + 0.5D);
player.teleport(actualWarp);
if (pvp) {
Util.sendMessage(player,ChatColor.BOLD + "String_Node_Str" + ChatColor.RED+ plugin.myLocale(player.getUniqueId()).igs.get(SettingsFlag.PVP)+ "String_Node_Str"+ plugin.myLocale(player.getUniqueId()).igsAllowed);
if (plugin.getServer().getVersion().contains("String_Node_Str") || plugin.getServer().getVersion().contains("String_Node_Str")) {
  player.getWorld().playSound(player.getLocation(),Sound.valueOf("String_Node_Str"),1F,1F);
}
 else {
  player.getWorld().playSound(player.getLocation(),Sound.ENTITY_ARROW_HIT,1F,1F);
}
}
 else {
if (plugin.getServer().getVersion().contains("String_Node_Str") || plugin.getServer().getVersion().contains("String_Node_Str")) {
  player.getWorld().playSound(player.getLocation(),Sound.valueOf("String_Node_Str"),1F,1F);
}
 else {
  player.getWorld().playSound(player.getLocation(),Sound.ENTITY_BAT_TAKEOFF,1F,1F);
}
}
return true;
}
}
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
final UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().hasIsland(targetPlayerUUID) || plugin.getPlayers().inTeam(targetPlayerUUID)) {
calculateIslandLevel(player,targetPlayerUUID);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIslandOther);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Player invitedPlayer=plugin.getServer().getPlayer(split[1]);
if (invitedPlayer == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorOfflinePlayer);
return true;
}
final UUID invitedPlayerUUID=invitedPlayer.getUniqueId();
if (!plugin.getPlayers().hasIsland(player.getUniqueId())) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
return true;
}
if (player.getUniqueId().equals(invitedPlayer.getUniqueId())) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouCannotInviteYourself);
return true;
}
long time=plugin.getPlayers().getInviteCoolDownTime(invitedPlayerUUID,plugin.getPlayers().getIslandLocation(playerUUID));
if (time > 0 && !player.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorCoolDown.replace("String_Node_Str",String.valueOf(time)));
return true;
}
if (plugin.getPlayers().inTeam(player.getUniqueId())) {
if (teamLeader.equals(player.getUniqueId())) {
if (!plugin.getPlayers().inTeam(invitedPlayerUUID)) {
int maxSize=Settings.maxTeamSize;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
  if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
    maxSize=Settings.maxTeamSize;
    break;
  }
 else {
    String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
    if (spl.length > 1) {
      if (!NumberUtils.isDigits(spl[1])) {
        plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
      }
 else {
        maxSize=Math.max(maxSize,Integer.valueOf(spl[1]));
      }
    }
  }
}
if (maxSize < 1) {
  maxSize=1;
}
}
if (teamMembers.size() < maxSize) {
if (inviteList.containsValue(playerUUID)) {
  inviteList.remove(getKeyByValue(inviteList,player.getUniqueId()));
  Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
inviteList.put(invitedPlayerUUID,player.getUniqueId());
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteinviteSentTo.replace("String_Node_Str",invitedPlayer.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),plugin.myLocale(invitedPlayerUUID).invitenameHasInvitedYou.replace("String_Node_Str",player.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.WHITE + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str"+ plugin.myLocale(invitedPlayerUUID).invitetoAcceptOrReject);
if (plugin.getPlayers().hasIsland(invitedPlayerUUID)) {
  Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.RED + plugin.myLocale(invitedPlayerUUID).invitewarningYouWillLoseIsland);
}
if (Settings.inviteTimeout > 0) {
  plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
    @Override public void run(){
      if (inviteList.containsKey(invitedPlayerUUID) && inviteList.get(invitedPlayerUUID).equals(playerUUID)) {
        inviteList.remove(invitedPlayerUUID);
        if (plugin.getServer().getPlayer(playerUUID) != null) {
          Util.sendMessage(plugin.getServer().getPlayer(playerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
        }
        if (plugin.getServer().getPlayer(invitedPlayerUUID) != null) {
          Util.sendMessage(plugin.getServer().getPlayer(invitedPlayerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
        }
      }
    }
  }
,Settings.inviteTimeout);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYourIslandIsFull);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorThatPlayerIsAlreadyInATeam);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
}
}
 else {
if (!plugin.getPlayers().inTeam(invitedPlayerUUID)) {
if (inviteList.containsValue(playerUUID)) {
inviteList.remove(getKeyByValue(inviteList,player.getUniqueId()));
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
inviteList.put(invitedPlayerUUID,player.getUniqueId());
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteinviteSentTo.replace("String_Node_Str",invitedPlayer.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),plugin.myLocale(invitedPlayerUUID).invitenameHasInvitedYou.replace("String_Node_Str",player.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.WHITE + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str"+ plugin.myLocale(invitedPlayerUUID).invitetoAcceptOrReject);
if (plugin.getPlayers().hasIsland(invitedPlayerUUID)) {
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.RED + plugin.myLocale(invitedPlayerUUID).invitewarningYouWillLoseIsland);
}
if (Settings.inviteTimeout > 0) {
plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
@Override public void run(){
  if (inviteList.containsKey(invitedPlayerUUID) && inviteList.get(invitedPlayerUUID).equals(playerUUID)) {
    inviteList.remove(invitedPlayerUUID);
    if (plugin.getServer().getPlayer(playerUUID) != null) {
      Util.sendMessage(plugin.getServer().getPlayer(playerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
    }
    if (plugin.getServer().getPlayer(invitedPlayerUUID) != null) {
      Util.sendMessage(plugin.getServer().getPlayer(invitedPlayerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
    }
  }
}
}
,Settings.inviteTimeout);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorThatPlayerIsAlreadyInATeam);
}
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
Player target=plugin.getServer().getPlayer(split[1]);
if (target == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorOfflinePlayer);
return true;
}
final UUID targetPlayerUUID=target.getUniqueId();
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
return true;
}
if (playerUUID.equals(targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouCannotInviteYourself);
return true;
}
if (plugin.getPlayers().getMembers(playerUUID).contains(targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).coopOnYourTeam);
return true;
}
if (!plugin.getPlayers().inTeam(targetPlayerUUID)) {
if (!plugin.getPlayers().hasIsland(targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIslandOther);
return true;
}
}
long time=plugin.getPlayers().getInviteCoolDownTime(targetPlayerUUID,plugin.getPlayers().getIslandLocation(playerUUID));
if (time > 0 && !player.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorCoolDown.replace("String_Node_Str",String.valueOf(time)));
return true;
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteinviteSentTo.replace("String_Node_Str",target.getName()));
Util.sendMessage(target,ChatColor.GREEN + plugin.myLocale(targetPlayerUUID).coopHasInvited.replace("String_Node_Str",player.getName()));
Util.sendMessage(target,ChatColor.GREEN + Settings.ISLANDCOMMAND + "String_Node_Str"+ plugin.myLocale(targetPlayerUUID).invitetoAcceptOrReject);
coopInviteList.put(targetPlayerUUID,playerUUID);
if (Settings.inviteTimeout > 0) {
plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
@Override public void run(){
if (coopInviteList.containsKey(targetPlayerUUID) && inviteList.get(targetPlayerUUID).equals(playerUUID)) {
inviteList.remove(targetPlayerUUID);
if (plugin.getServer().getPlayer(playerUUID) != null) {
Util.sendMessage(plugin.getServer().getPlayer(playerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
if (plugin.getServer().getPlayer(targetPlayerUUID) != null) {
Util.sendMessage(plugin.getServer().getPlayer(targetPlayerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
}
}
}
,Settings.inviteTimeout);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelNotYourself);
return true;
}
Player target=plugin.getServer().getPlayer(targetPlayerUUID);
if (target != null) {
if (target.isOp() || VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str") || VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelFail.replace("String_Node_Str",target.getName()));
return true;
}
}
boolean coop=CoopPlay.getInstance().removeCoopPlayer(player,targetPlayerUUID);
if (coop) {
if (target != null) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).coopRemoved.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.RED + plugin.myLocale(targetPlayerUUID).coopRemoved.replace("String_Node_Str",player.getName()));
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).coopRemoveSuccess.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayerUUID)));
}
if (target != null && plugin.getGrid().isOnIsland(player,target)) {
if (plugin.getPlayers().inTeam(targetPlayerUUID) || plugin.getPlayers().hasIsland(targetPlayerUUID)) {
plugin.getGrid().homeTeleport(target);
}
 else {
if (!target.performCommand(Settings.SPAWNCOMMAND)) {
target.teleport(player.getWorld().getSpawnLocation());
}
}
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).expelExpelled);
plugin.getLogger().info(player.getName() + "String_Node_Str" + target.getName()+ "String_Node_Str");
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).expelSuccess.replace("String_Node_Str",target.getName()));
}
 else if (!coop) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelNotOnIsland);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelNotYourself);
return true;
}
OfflinePlayer target=plugin.getServer().getOfflinePlayer(targetPlayerUUID);
boolean coop=CoopPlay.getInstance().removeCoopPlayer(player,targetPlayerUUID);
if (coop) {
if (target != null && target.isOnline()) {
Util.sendMessage(target.getPlayer(),ChatColor.RED + plugin.myLocale(target.getUniqueId()).coopRemoved.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.RED + plugin.myLocale(targetPlayerUUID).coopRemoved.replace("String_Node_Str",player.getName()));
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).coopRemoveSuccess.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayerUUID)));
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).coopNotInCoop.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayerUUID)));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
final UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotYourself);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID) && plugin.getPlayers().inTeam(targetPlayerUUID)) {
if (plugin.getPlayers().getTeamLeader(playerUUID).equals(plugin.getPlayers().getTeamLeader(targetPlayerUUID))) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotTeamMember);
return true;
}
}
if (plugin.getPlayers().isBanned(playerUUID,targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).banAlreadyBanned.replace("String_Node_Str",split[1]));
return true;
}
Player target=plugin.getServer().getPlayer(targetPlayerUUID);
OfflinePlayer offlineTarget=plugin.getServer().getOfflinePlayer(targetPlayerUUID);
if (offlineTarget.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banFail.replace("String_Node_Str",split[1]));
return true;
}
if (target != null) {
if (VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banFail.replace("String_Node_Str",split[1]));
return true;
}
boolean coop=CoopPlay.getInstance().removeCoopPlayer(player,target);
if (coop) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).coopRemoved.replace("String_Node_Str",player.getName()));
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).coopRemoveSuccess.replace("String_Node_Str",target.getName()));
}
if (plugin.getGrid().isOnIsland(player,target)) {
if (plugin.getPlayers().inTeam(targetPlayerUUID) || plugin.getPlayers().hasIsland(targetPlayerUUID)) {
plugin.getGrid().homeTeleport(target);
}
 else {
if (!target.performCommand(Settings.SPAWNCOMMAND)) {
target.teleport(player.getWorld().getSpawnLocation());
}
}
}
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(targetPlayerUUID).banBanned.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.RED + plugin.myLocale(targetPlayerUUID).banBanned.replace("String_Node_Str",player.getName()));
}
plugin.getLogger().info(player.getName() + "String_Node_Str" + split[1]+ "String_Node_Str");
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banSuccess.replace("String_Node_Str",split[1]));
plugin.getMessages().tellTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banSuccess.replace("String_Node_Str",split[1]));
plugin.getMessages().tellOfflineTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banSuccess.replace("String_Node_Str",split[1]));
plugin.getPlayers().ban(playerUUID,targetPlayerUUID);
plugin.getGrid().saveGrid();
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
final UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotYourself);
return true;
}
if (!plugin.getPlayers().isBanned(playerUUID,targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotBanned.replace("String_Node_Str",split[1]));
return true;
}
Player target=plugin.getServer().getPlayer(targetPlayerUUID);
if (target != null) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).banLifted.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.GREEN + plugin.myLocale(targetPlayerUUID).banLifted.replace("String_Node_Str",player.getName()));
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banLiftedSuccess.replace("String_Node_Str",split[1]));
plugin.getLogger().info(player.getName() + "String_Node_Str" + split[1]+ "String_Node_Str");
plugin.getMessages().tellTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banLiftedSuccess.replace("String_Node_Str",split[1]));
plugin.getMessages().tellOfflineTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banLiftedSuccess.replace("String_Node_Str",split[1]));
plugin.getPlayers().unBan(playerUUID,targetPlayerUUID);
plugin.getGrid().saveGrid();
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNoTeam);
return true;
}
if (teamLeader != null && !teamLeader.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorOnlyLeaderCan);
return true;
}
targetPlayer=null;
for (UUID member : teamMembers) {
if (plugin.getPlayers().getName(member).equalsIgnoreCase(split[1])) {
targetPlayer=member;
}
}
if (targetPlayer == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNotPartOfTeam);
return true;
}
if (teamMembers.contains(targetPlayer)) {
if (player.getUniqueId().equals(targetPlayer)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).leaveerrorLeadersCannotLeave);
return true;
}
if (!removePlayerFromTeam(targetPlayer,teamLeader)) {
return true;
}
plugin.getPlayers().startInviteCoolDownTimer(targetPlayer,plugin.getPlayers().getIslandLocation(playerUUID));
if (Settings.resetChallenges) {
plugin.getPlayers().resetAllChallenges(targetPlayer,false);
}
plugin.getPlayers().setIslandLevel(targetPlayer,0);
TopTen.topTenAddEntry(playerUUID,0);
Player target=plugin.getServer().getPlayer(targetPlayer);
if (target != null) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(targetPlayer).kicknameRemovedYou.replace("String_Node_Str",player.getName()));
CoopPlay.getInstance().clearMyInvitedCoops(target);
CoopPlay.getInstance().clearMyCoops(target);
if (target.getWorld().equals(ASkyBlock.getIslandWorld())) {
if (!Settings.kickedKeepInv) {
for (ItemStack i : target.getInventory().getContents()) {
  if (i != null) {
    try {
      Item drop=player.getWorld().dropItemNaturally(player.getLocation(),i);
      PlayerDropItemEvent event=new PlayerDropItemEvent(target,drop);
      plugin.getServer().getPluginManager().callEvent(event);
    }
 catch (    Exception e) {
    }
  }
}
target.getInventory().clear();
target.getInventory().setArmorContents(null);
target.getInventory().setHelmet(null);
target.getInventory().setChestplate(null);
target.getInventory().setLeggings(null);
target.getInventory().setBoots(null);
target.getEquipment().clear();
target.updateInventory();
}
}
if (!target.performCommand(Settings.SPAWNCOMMAND)) {
target.teleport(ASkyBlock.getIslandWorld().getSpawnLocation());
}
}
 else {
if (DEBUG) plugin.getLogger().info("String_Node_Str" + targetPlayer.toString());
plugin.getMessages().setMessage(targetPlayer,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kicknameRemovedYou.replace("String_Node_Str",player.getName()));
}
plugin.getWarpSignsListener().removeWarp(targetPlayer);
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kicknameRemoved.replace("String_Node_Str",split[1]));
teamMembers.remove(targetPlayer);
if (teamMembers.size() < 2) {
if (!removePlayerFromTeam(player.getUniqueId(),teamLeader)) {
return true;
}
}
plugin.getPlayers().save(targetPlayer);
}
 else {
plugin.getLogger().warning("String_Node_Str" + player.getName() + "String_Node_Str"+ plugin.getPlayers().getName(targetPlayer));
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNotPartOfTeam);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
targetPlayer=plugin.getPlayers().getUUID(split[1]);
if (targetPlayer == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayer.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorGeneralError);
return true;
}
if (!plugin.getPlayers().inTeam(player.getUniqueId())) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorYouMustBeInTeam);
return true;
}
if (plugin.getPlayers().getMembers(player.getUniqueId()).size() > 2) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorRemoveAllPlayersFirst);
plugin.getLogger().info(player.getName() + "String_Node_Str");
return true;
}
if (plugin.getPlayers().inTeam(player.getUniqueId())) {
if (teamLeader.equals(player.getUniqueId())) {
if (teamMembers.contains(targetPlayer)) {
if (!removePlayerFromTeam(targetPlayer,teamLeader,true)) {
return true;
}
if (!removePlayerFromTeam(teamLeader,teamLeader,true)) {
return true;
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).makeLeadernameIsNowTheOwner.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayer)));
plugin.getGrid().transferIsland(player.getUniqueId(),targetPlayer);
addPlayertoTeam(player.getUniqueId(),targetPlayer);
addPlayertoTeam(targetPlayer,targetPlayer);
Player target=plugin.getServer().getPlayer(targetPlayer);
if (target == null) {
plugin.getMessages().setMessage(targetPlayer,plugin.myLocale(player.getUniqueId()).makeLeaderyouAreNowTheOwner);
}
 else {
Util.sendMessage(plugin.getServer().getPlayer(targetPlayer),ChatColor.GREEN + plugin.myLocale(targetPlayer).makeLeaderyouAreNowTheOwner);
boolean hasARangePerm=false;
int range=Settings.islandProtectionRange;
Island islandByOwner=plugin.getGrid().getIsland(targetPlayer);
if (islandByOwner.getProtectionSize() == 0) {
  plugin.getLogger().warning("String_Node_Str" + player.getName() + "String_Node_Str"+ range);
  islandByOwner.setProtectionSize(range);
}
for (PermissionAttachmentInfo perms : target.getEffectivePermissions()) {
  if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
    if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
      break;
    }
 else {
      String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
      if (spl.length > 1) {
        if (!NumberUtils.isDigits(spl[1])) {
          plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
        }
 else {
          hasARangePerm=true;
          range=Math.max(range,Integer.valueOf(spl[1]));
        }
      }
    }
  }
}
if (hasARangePerm) {
  if (range % 2 != 0) {
    range--;
  }
  if (range != islandByOwner.getProtectionSize()) {
    Util.sendMessage(player,ChatColor.GOLD + plugin.myLocale(targetPlayer).adminSetRangeUpdated.replace("String_Node_Str",String.valueOf(range)));
    Util.sendMessage(target,ChatColor.GOLD + plugin.myLocale(targetPlayer).adminSetRangeUpdated.replace("String_Node_Str",String.valueOf(range)));
    plugin.getLogger().info("String_Node_Str" + islandByOwner.getProtectionSize() + "String_Node_Str"+ range+ "String_Node_Str"+ player.getName()+ "String_Node_Str");
  }
  islandByOwner.setProtectionSize(range);
}
}
plugin.getGrid().saveGrid();
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorThatPlayerIsNotInTeam);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorNotYourIsland);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorGeneralError);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
break;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}

Fixed version (ground truth):
@Override public boolean onCommand(final CommandSender sender,final Command command,final String label,final String[] split){
  if (!(sender instanceof Player)) {
    Util.sendMessage(sender,plugin.myLocale().errorUseInGame);
    return false;
  }
  final Player player=(Player)sender;
  if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islanderrorYouDoNotHavePermission);
    return true;
  }
  final UUID playerUUID=player.getUniqueId();
  if (playerUUID == null) {
    plugin.getLogger().severe("String_Node_Str" + sender.getName() + "String_Node_Str");
    Util.sendMessage(sender,ChatColor.RED + plugin.myLocale().errorCommandNotReady + "String_Node_Str");
    return true;
  }
  final UUID teamLeader=plugin.getPlayers().getTeamLeader(playerUUID);
  List<UUID> teamMembers=new ArrayList<UUID>();
  if (teamLeader != null) {
    teamMembers=plugin.getPlayers().getMembers(teamLeader);
  }
  if (split.length > 1 && split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
      String name=split[1];
      for (int i=2; i < split.length; i++) {
        name=name + "String_Node_Str" + split[i];
      }
      if (name.length() < Settings.minNameLength) {
        Util.sendMessage(player,ChatColor.RED + (plugin.myLocale(player.getUniqueId()).errorTooShort).replace("String_Node_Str",String.valueOf(Settings.minNameLength)));
        return true;
      }
      if (name.length() > Settings.maxNameLength) {
        Util.sendMessage(player,ChatColor.RED + (plugin.myLocale(player.getUniqueId()).errorTooLong).replace("String_Node_Str",String.valueOf(Settings.maxNameLength)));
        return true;
      }
      plugin.getGrid().setIslandName(playerUUID,ChatColor.translateAlternateColorCodes('&',name));
      Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).generalSuccess);
      return true;
    }
 else {
      Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
      return true;
    }
  }
  UUID targetPlayer=null;
switch (split.length) {
case 0:
    if (plugin.getPlayers().getIslandLocation(playerUUID) == null && !plugin.getPlayers().inTeam(playerUUID)) {
      if (Settings.maxIslands > 0 && plugin.getGrid().getIslandCount() > Settings.maxIslands) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorMaxIslands);
        return true;
      }
      if (plugin.getPlayers().getResetsLeft(playerUUID) == 0) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandResetNoMore);
        return true;
      }
      Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).islandnew);
      chooseIsland(player);
      return true;
    }
 else {
      if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().getControlPanel(playerUUID)) {
        Util.runCommand(player,Settings.ISLANDCOMMAND + "String_Node_Str");
      }
 else {
        if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
          Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
          return true;
        }
        if (!player.getWorld().getName().equalsIgnoreCase(Settings.worldName) || Settings.allowTeleportWhenFalling || !PlayerEvents.isFalling(playerUUID)|| (player.isOp() && !Settings.damageOps)) {
          plugin.getGrid().homeTeleport(player);
          if (Settings.islandRemoveMobs) {
            plugin.getGrid().removeMobs(player.getLocation());
          }
        }
 else {
          Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
        }
      }
      return true;
    }
case 1:
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
      if (!plugin.getGrid().playerIsOnIsland(player)) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNotOnIsland);
        return true;
      }
      ItemStack item=player.getItemInHand();
      double multiplier=1;
      if (item != null && item.getType().isBlock()) {
        for (        PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
          if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
            String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
            if (spl.length > 1) {
              if (!NumberUtils.isDigits(spl[1])) {
                plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
              }
 else {
                multiplier=Math.max(multiplier,Integer.valueOf(spl[1]));
              }
            }
          }
          if (multiplier < 1) {
            multiplier=1;
          }
        }
        if (player.getLocation().getBlockY() < Settings.seaHeight) {
          multiplier*=Settings.underWaterMultiplier;
        }
        int value=0;
        if (Settings.blockValues.containsKey(item.getData())) {
          value=(int)((double)Settings.blockValues.get(item.getData()) * multiplier);
        }
 else         if (Settings.blockValues.containsKey(new MaterialData(item.getType()))) {
          value=(int)((double)Settings.blockValues.get(new MaterialData(item.getType())) * multiplier);
        }
        if (value > 0) {
          Util.sendMessage(player,ChatColor.GREEN + (plugin.myLocale(player.getUniqueId()).islandblockValue.replace("String_Node_Str",Util.prettifyText(item.getType().name())).replace("String_Node_Str",String.valueOf(value))));
        }
 else {
          Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).islandblockWorthless.replace("String_Node_Str",Util.prettifyText(item.getType().name())));
        }
      }
 else {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNotABlock);
      }
      return true;
    }
  }
 else   if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
      Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpName);
      return true;
    }
  }
 else   if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
      plugin.getGrid().setIslandName(playerUUID,null);
      Util.sendMessage(sender,plugin.myLocale().generalSuccess);
    }
    return true;
  }
if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpCoop);
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpUnCoop);
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpExpel);
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
    if (!Settings.teamChat) {
      Util.sendMessage(player,ChatColor.RED + plugin.myLocale().errorUnknownCommand);
      return false;
    }
    if (plugin.getPlayers().inTeam(playerUUID)) {
      boolean online=false;
      for (      UUID teamMember : plugin.getPlayers().getMembers(playerUUID)) {
        if (!teamMember.equals(playerUUID) && plugin.getServer().getPlayer(teamMember) != null) {
          online=true;
        }
      }
      if (!online) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).teamChatNoTeamAround);
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).teamChatStatusOff);
        plugin.getChatListener().unSetPlayer(playerUUID);
        return true;
      }
      if (plugin.getChatListener().isTeamChat(playerUUID)) {
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).teamChatStatusOff);
        plugin.getChatListener().unSetPlayer(playerUUID);
      }
 else {
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).teamChatStatusOn);
        plugin.getChatListener().setPlayer(playerUUID);
      }
    }
 else {
      Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).teamChatNoTeam);
    }
  }
 else {
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
  }
  return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).adminInfoBannedPlayers + "String_Node_Str");
  List<UUID> bannedList=plugin.getPlayers().getBanList(playerUUID);
  if (bannedList.isEmpty()) {
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).banNone);
  }
 else {
    for (    UUID bannedPlayers : bannedList) {
      Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + plugin.getPlayers().getName(bannedPlayers));
    }
  }
  return true;
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(playerUUID).islandhelpBan);
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(playerUUID).islandhelpUnban);
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!pendingNewIslandSelection.contains(playerUUID)) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale().errorUnknownCommand);
  return false;
}
pendingNewIslandSelection.remove(playerUUID);
Island oldIsland=plugin.getGrid().getIsland(player.getUniqueId());
newIsland(player);
if (resettingIsland.contains(playerUUID)) {
  resettingIsland.remove(playerUUID);
  resetPlayer(player,oldIsland);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,"String_Node_Str" + label + "String_Node_Str");
  displayLocales(player);
}
 else {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  try {
    player.openInventory(plugin.getSettingsPanel().islandGuardPanel(player));
  }
 catch (  Exception e) {
    if (DEBUG)     e.printStackTrace();
    Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
  }
}
 else {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
  return true;
}
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
  return true;
}
 else {
  if (!island.isLocked()) {
    for (    Player target : plugin.getServer().getOnlinePlayers()) {
      if (target == null || target.hasMetadata("String_Node_Str") || target.isOp() || player.equals(target) || VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str"))       continue;
      if (plugin.getGrid().isOnIsland(player,target) && !CoopPlay.getInstance().getCoopPlayers(island.getCenter()).contains(target.getUniqueId())) {
        if (plugin.getPlayers().inTeam(target.getUniqueId()) || plugin.getPlayers().hasIsland(target.getUniqueId())) {
          plugin.getGrid().homeTeleport(target);
        }
 else {
          if (!target.performCommand(Settings.SPAWNCOMMAND)) {
            target.teleport(player.getWorld().getSpawnLocation());
          }
        }
        Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).expelExpelled);
        plugin.getLogger().info(player.getName() + "String_Node_Str" + target.getName()+ "String_Node_Str");
        Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).expelSuccess.replace("String_Node_Str",target.getName()));
      }
    }
    Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).lockLocking);
    plugin.getMessages().tellOfflineTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerLocked.replace("String_Node_Str",player.getName()));
    plugin.getMessages().tellTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerLocked.replace("String_Node_Str",player.getName()));
    island.setLocked(true);
  }
 else {
    Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).lockUnlocking);
    plugin.getMessages().tellOfflineTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerUnlocked.replace("String_Node_Str",player.getName()));
    plugin.getMessages().tellTeam(playerUUID,plugin.myLocale(playerUUID).lockPlayerUnlocked.replace("String_Node_Str",player.getName()));
    island.setLocked(false);
  }
  return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
  return true;
}
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoIsland);
  return true;
}
plugin.getGrid().homeTeleport(player);
if (Settings.islandRemoveMobs) {
  plugin.getGrid().removeMobs(player.getLocation());
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str" + ChatColor.GREEN+ plugin.getDescription().getName()+ ChatColor.GOLD+ "String_Node_Str"+ ChatColor.AQUA+ plugin.getDescription().getVersion()+ ChatColor.GOLD+ "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
Util.sendMessage(player,ChatColor.GOLD + "String_Node_Str");
return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (ControlPanel.controlPanel.containsKey(ControlPanel.getDefaultPanelName())) {
  player.openInventory(ControlPanel.controlPanel.get(ControlPanel.getDefaultPanelName()));
  return true;
}
 else {
  Util.sendMessage(player,plugin.myLocale(playerUUID).errorCommandNotReady);
  plugin.getLogger().severe("String_Node_Str");
  return true;
}
}
}
if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (Settings.useEconomy && Settings.useMinishop) {
if (plugin.getGrid().getIsland(player.getUniqueId()) == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
if (player.getWorld().equals(ASkyBlock.getIslandWorld()) || player.getWorld().equals(ASkyBlock.getNetherWorld())) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
  if (ControlPanel.miniShop != null) {
    player.openInventory(ControlPanel.miniShop);
  }
 else {
    Util.sendMessage(player,plugin.myLocale(playerUUID).errorCommandNotReady);
    plugin.getLogger().severe("String_Node_Str");
  }
  return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorWrongWorld);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorMinishopDisabled);
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.YELLOW + "String_Node_Str" + ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpWarp);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Collection<UUID> warpList=plugin.getWarpSignsListener().listWarps();
if (warpList.isEmpty()) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpserrorNoWarpsYet);
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getGrid().playerIsOnIsland(player)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
return true;
}
 else {
if (Settings.useWarpPanel) {
player.openInventory(plugin.getWarpPanel().getWarpPanel(0));
}
 else {
Boolean hasWarp=false;
String wlist="String_Node_Str";
for (UUID w : warpList) {
  if (w == null)   continue;
  if (wlist.isEmpty()) {
    wlist=plugin.getPlayers().getName(w);
  }
 else {
    wlist+="String_Node_Str" + plugin.getPlayers().getName(w);
  }
  if (w.equals(playerUUID)) {
    hasWarp=true;
  }
}
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpswarpsAvailable + "String_Node_Str"+ ChatColor.WHITE+ wlist);
if (!hasWarp && (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str"))) {
  Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
}
return true;
}
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
if (!plugin.getPlayers().hasIsland(playerUUID)) {
Util.runCommand(player,Settings.ISLANDCOMMAND);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
if (!plugin.getPlayers().getTeamLeader(playerUUID).equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandresetOnlyOwner);
}
 else {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandresetMustRemovePlayers);
}
return true;
}
if (plugin.getPlayers().getResetsLeft(playerUUID) == 0) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandResetNoMore);
return true;
}
if (plugin.getPlayers().getResetsLeft(playerUUID) > 0) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).resetYouHave.replace("String_Node_Str",String.valueOf(plugin.getPlayers().getResetsLeft(playerUUID))));
}
if (!onRestartWaitTime(player) || Settings.resetWait == 0 || player.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandresetConfirm.replace("String_Node_Str",String.valueOf(Settings.resetConfirmWait)));
if (!confirm.containsKey(playerUUID) || !confirm.get(playerUUID)) {
confirm.put(playerUUID,true);
plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
@Override public void run(){
  confirm.put(playerUUID,false);
}
}
,(Settings.resetConfirmWait * 20));
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandresetWait.replace("String_Node_Str",String.valueOf(getResetWaitTime(player))));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (confirm.containsKey(playerUUID) && confirm.get(playerUUID)) {
confirm.remove(playerUUID);
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandresetPleaseWait);
if (plugin.getPlayers().getResetsLeft(playerUUID) == 0) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).islandResetNoMore);
}
if (plugin.getPlayers().getResetsLeft(playerUUID) > 0) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).resetYouHave.replace("String_Node_Str",String.valueOf(plugin.getPlayers().getResetsLeft(playerUUID))));
}
List<Schematic> schems=getSchematics(player,false);
Island oldIsland=plugin.getGrid().getIsland(player.getUniqueId());
if (schems.isEmpty()) {
newIsland(player);
resetPlayer(player,oldIsland);
}
 else if (schems.size() == 1) {
newIsland(player,schems.get(0));
resetPlayer(player,oldIsland);
}
 else {
if (Settings.useSchematicPanel) {
pendingNewIslandSelection.add(playerUUID);
resettingIsland.add(playerUUID);
player.openInventory(plugin.getSchematicsPanel().getPanel(player));
}
 else {
schems=getSchematics(player,true);
if (schems.isEmpty()) {
  newIsland(player);
}
 else if (Settings.chooseIslandRandomly) {
  newIsland(player,schems.get(random.nextInt(schems.size())));
}
 else {
  newIsland(player,schems.get(0));
}
resetPlayer(player,oldIsland);
}
}
return true;
}
 else {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpRestart);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (plugin.getGrid().getIsland(player.getUniqueId()) == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
plugin.getGrid().homeSet(player);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + plugin.myLocale(player.getUniqueId()).helpHeader.replace("String_Node_Str",plugin.getDescription().getName()).replace("String_Node_Str",plugin.getDescription().getVersion()));
if (Settings.useControlPanel) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpControlPanel);
}
 else {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpIsland);
}
int maxHomes=Settings.maxHomes;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
maxHomes=Settings.maxHomes;
break;
}
 else {
String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
if (spl.length > 1) {
  if (!NumberUtils.isDigits(spl[1])) {
    plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
  }
 else {
    maxHomes=Math.max(maxHomes,Integer.valueOf(spl[1]));
  }
}
}
}
if (maxHomes < 1) {
maxHomes=1;
}
}
if (maxHomes > 1 && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ maxHomes+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTeleport);
}
 else if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTeleport);
}
if (plugin.getGrid() != null && plugin.getGrid().getSpawn() != null && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpSpawn);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpControlPanel);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpRestart);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (maxHomes > 1) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ maxHomes+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpSetHome);
}
 else {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpSetHome);
}
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpLevel);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpLevelPlayer);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpName);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTop);
}
if (Settings.useEconomy && VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpMiniShop);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpValue);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpWarps);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpWarp);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpTeam);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpInvite);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpLeave);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpKick);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpAcceptReject);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpMakeLeader);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).teamChatHelp);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpBiome);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpExpel);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpBan);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpBanList);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpUnban);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpCoop);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpUnCoop);
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpListCoops);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpLock);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpResetName);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpSettings);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + plugin.myLocale(player.getUniqueId()).islandHelpChallenges);
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandHelpSelectLanguage);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
Island island=plugin.getGrid().getIsland(playerUUID);
boolean none=true;
for (UUID uuid : CoopPlay.getInstance().getCoopPlayers(island.getCenter())) {
Util.sendMessage(player,ChatColor.GREEN + plugin.getPlayers().getName(uuid));
none=false;
}
if (none) {
Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.WHITE+ plugin.myLocale(player.getUniqueId()).islandhelpCoop);
}
 else {
Util.sendMessage(player,plugin.myLocale(playerUUID).helpColor + plugin.myLocale(playerUUID).coopUseExpel);
}
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (teamLeader != null && !teamLeader.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).levelerrornotYourIsland);
return true;
}
if (!plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
if (!plugin.getGrid().playerIsOnIsland(player)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).challengeserrorNotOnIsland);
return true;
}
if (plugin.getPlayers().getIslandLocation(playerUUID).getWorld().getEnvironment().equals(Environment.NETHER)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorWrongWorld);
return true;
}
Inventory inv=plugin.getBiomes().getBiomePanel(player);
if (inv != null) {
player.openInventory(inv);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") && plugin.getGrid().getSpawn() != null) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Location l=ASkyBlock.getIslandWorld().getSpawnLocation();
l.add(new Vector(0.5,0,0.5));
Island spawn=plugin.getGrid().getSpawn();
if (spawn != null && spawn.getSpawnPoint() != null) {
l=spawn.getSpawnPoint();
}
player.teleport(l);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
TopTen.topTenShow(player);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID) && !plugin.getPlayers().hasIsland(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
 else {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).topTenerrorExcluded.replace("String_Node_Str",Settings.PERMPREFIX + "String_Node_Str"));
}
calculateIslandLevel(player,playerUUID);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,plugin.myLocale(player.getUniqueId()).invitehelp);
if (plugin.getPlayers().inTeam(playerUUID)) {
if (teamLeader.equals(playerUUID)) {
int maxSize=Settings.maxTeamSize;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
  if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
    if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
      maxSize=Settings.maxTeamSize;
      break;
    }
 else {
      String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
      if (spl.length > 1) {
        if (!NumberUtils.isDigits(spl[1])) {
          plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
        }
 else {
          maxSize=Math.max(maxSize,Integer.valueOf(spl[1]));
        }
      }
    }
  }
  if (maxSize < 1) {
    maxSize=1;
  }
}
if (teamMembers.size() < maxSize) {
  Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteyouCanInvite.replace("String_Node_Str",String.valueOf(maxSize - teamMembers.size())));
}
 else {
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYourIslandIsFull);
}
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
return true;
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (coopInviteList.containsKey(playerUUID)) {
Player inviter=plugin.getServer().getPlayer(coopInviteList.get(playerUUID));
if (inviter == null || !inviter.isOnline()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorOfflinePlayer);
coopInviteList.remove(playerUUID);
return true;
}
if (CoopPlay.getInstance().addCoopPlayer(inviter,player)) {
Util.sendMessage(inviter,ChatColor.GREEN + plugin.myLocale(inviter.getUniqueId()).coopSuccess.replace("String_Node_Str",player.getName()));
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).coopMadeYouCoop.replace("String_Node_Str",inviter.getName()));
}
setResetWaitTime(player);
coopInviteList.remove(playerUUID);
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID) && inviteList.containsKey(playerUUID)) {
if (plugin.getPlayers().hasIsland(playerUUID)) {
plugin.getLogger().info(player.getName() + "String_Node_Str");
plugin.deletePlayerIsland(playerUUID,true);
plugin.getLogger().info("String_Node_Str");
}
addPlayertoTeam(playerUUID,inviteList.get(playerUUID));
if (!plugin.getPlayers().inTeam(inviteList.get(playerUUID))) {
addPlayertoTeam(inviteList.get(playerUUID),inviteList.get(playerUUID));
}
setResetWaitTime(player);
if (Settings.teamJoinDeathReset) {
plugin.getPlayers().setDeaths(player.getUniqueId(),0);
}
plugin.getGrid().homeTeleport(player);
plugin.resetPlayer(player);
if (!player.hasPermission(Settings.PERMPREFIX + "String_Node_Str")) {
runCommands(Settings.teamStartCommands,player);
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).inviteyouHaveJoinedAnIsland);
if (plugin.getServer().getPlayer(inviteList.get(playerUUID)) != null) {
Util.sendMessage(plugin.getServer().getPlayer(inviteList.get(playerUUID)),ChatColor.GREEN + plugin.myLocale(inviteList.get(playerUUID)).invitehasJoinedYourIsland.replace("String_Node_Str",player.getName()));
}
inviteList.remove(player.getUniqueId());
plugin.getGrid().saveGrid();
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorCommandNotReady);
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (coopInviteList.containsKey(playerUUID)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(playerUUID).rejectyouHaveRejectedInvitation);
if (Bukkit.getPlayer(inviteList.get(playerUUID)) != null) {
Util.sendMessage(Bukkit.getPlayer(inviteList.get(playerUUID)),ChatColor.RED + plugin.myLocale(inviteList.get(playerUUID)).rejectnameHasRejectedInvite.replace("String_Node_Str",player.getName()));
}
coopInviteList.remove(playerUUID);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).rejectyouHaveNotBeenInvited);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (inviteList.containsKey(player.getUniqueId())) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(playerUUID).rejectyouHaveRejectedInvitation);
if (Bukkit.getPlayer(inviteList.get(player.getUniqueId())) != null) {
Util.sendMessage(Bukkit.getPlayer(inviteList.get(playerUUID)),ChatColor.RED + plugin.myLocale(inviteList.get(playerUUID)).rejectnameHasRejectedInvite.replace("String_Node_Str",player.getName()));
}
inviteList.remove(playerUUID);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).rejectyouHaveNotBeenInvited);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (player.getWorld().equals(ASkyBlock.getIslandWorld()) || (Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null && player.getWorld().equals(ASkyBlock.getNetherWorld()))) {
if (plugin.getPlayers().inTeam(playerUUID)) {
if (plugin.getPlayers().getTeamLeader(playerUUID) != null && plugin.getPlayers().getTeamLeader(playerUUID).equals(playerUUID)) {
  Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).leaveerrorYouAreTheLeader);
  return true;
}
if (!leavingPlayers.contains(playerUUID)) {
  leavingPlayers.add(playerUUID);
  Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).leaveWarning);
  new BukkitRunnable(){
    @Override public void run(){
      if (leavingPlayers.contains(playerUUID)) {
        leavingPlayers.remove(playerUUID);
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).leaveCanceled);
      }
    }
  }
.runTaskLater(plugin,Settings.resetConfirmWait * 20L);
  return true;
}
leavingPlayers.remove(playerUUID);
if (!removePlayerFromTeam(playerUUID,teamLeader)) {
  return true;
}
CoopPlay.getInstance().clearMyInvitedCoops(player);
CoopPlay.getInstance().clearMyCoops(player);
plugin.getPlayers().startInviteCoolDownTimer(playerUUID,plugin.getPlayers().getTeamIslandLocation(teamLeader));
plugin.getWarpSignsListener().removeWarp(playerUUID);
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).leaveyouHaveLeftTheIsland);
if (plugin.getServer().getPlayer(teamLeader) != null) {
  Player leader=plugin.getServer().getPlayer(teamLeader);
  Util.sendMessage(leader,ChatColor.RED + plugin.myLocale(teamLeader).leavenameHasLeftYourIsland.replace("String_Node_Str",player.getName()));
}
 else {
  plugin.getMessages().setMessage(teamLeader,ChatColor.RED + plugin.myLocale(teamLeader).leavenameHasLeftYourIsland.replace("String_Node_Str",player.getName()));
}
if (teamMembers.size() < 2) {
  if (!removePlayerFromTeam(teamLeader,teamLeader)) {
    return true;
  }
}
plugin.resetPlayer(player);
if (!player.performCommand(Settings.SPAWNCOMMAND)) {
  player.teleport(player.getWorld().getSpawnLocation());
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).leaveerrorYouCannotLeaveIsland);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).leaveerrorYouMustBeInWorld);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (plugin.getPlayers().inTeam(playerUUID)) {
if (teamLeader.equals(playerUUID)) {
int maxSize=Settings.maxTeamSize;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
  if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
    maxSize=Settings.maxTeamSize;
    break;
  }
 else {
    String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
    if (spl.length > 1) {
      if (!NumberUtils.isDigits(spl[1])) {
        plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
      }
 else {
        maxSize=Math.max(maxSize,Integer.valueOf(spl[1]));
      }
    }
  }
}
if (maxSize < 1) {
  maxSize=1;
}
}
if (teamMembers.size() < maxSize) {
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteyouCanInvite.replace("String_Node_Str",String.valueOf(maxSize - teamMembers.size())));
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYourIslandIsFull);
}
}
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).teamlistingMembers + "String_Node_Str");
for (UUID m : plugin.getPlayers().getMembers(teamLeader)) {
Util.sendMessage(player,ChatColor.WHITE + plugin.getPlayers().getName(m));
}
}
 else if (inviteList.containsKey(playerUUID)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).invitenameHasInvitedYou.replace("String_Node_Str",plugin.getPlayers().getName(inviteList.get(playerUUID))));
Util.sendMessage(player,ChatColor.WHITE + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.YELLOW+ plugin.myLocale(player.getUniqueId()).invitetoAcceptOrReject);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNoTeam);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
break;
case 2:
if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (split[1].equalsIgnoreCase("String_Node_Str")) {
plugin.getPlayers().setControlPanel(playerUUID,true);
}
 else if (split[1].equalsIgnoreCase("String_Node_Str")) {
plugin.getPlayers().setControlPanel(playerUUID,false);
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).generalSuccess);
return true;
}
 else {
Util.sendMessage(player,plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (Settings.useWarpPanel) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Set<UUID> warpList=plugin.getWarpSignsListener().listWarps();
if (warpList.isEmpty()) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpserrorNoWarpsYet);
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getGrid().playerIsOnIsland(player)) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
return true;
}
 else {
int panelNum=0;
try {
panelNum=Integer.valueOf(split[1]) - 1;
}
 catch (Exception e) {
panelNum=0;
}
player.openInventory(plugin.getWarpPanel().getWarpPanel(panelNum));
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!pendingNewIslandSelection.contains(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
pendingNewIslandSelection.remove(playerUUID);
if (!schematics.containsKey(split[1])) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
 else {
Schematic schematic=schematics.get(split[1]);
if (schematic.getPerm().isEmpty() || VaultHelper.checkPerm(player,schematic.getPerm())) {
Island oldIsland=plugin.getGrid().getIsland(player.getUniqueId());
newIsland(player,schematic);
if (resettingIsland.contains(playerUUID)) {
resettingIsland.remove(playerUUID);
resetPlayer(player,oldIsland);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!NumberUtils.isDigits(split[1])) {
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
return true;
}
 else {
try {
int index=Integer.valueOf(split[1]);
if (index < 1 || index > plugin.getAvailableLocales().size()) {
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
return true;
}
for (ASLocale locale : plugin.getAvailableLocales().values()) {
if (locale.getIndex() == index) {
plugin.getPlayers().setLocale(playerUUID,locale.getLocaleName());
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(playerUUID).generalSuccess);
return true;
}
}
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
}
 catch (Exception e) {
Util.sendMessage(player,ChatColor.RED + "String_Node_Str" + label+ "String_Node_Str");
displayLocales(player);
}
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
int number=1;
try {
number=Integer.valueOf(split[1]);
if (number < 1) {
plugin.getGrid().homeTeleport(player,1);
}
 else {
int maxHomes=Settings.maxHomes;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
  maxHomes=Settings.maxHomes;
  break;
}
 else {
  String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
  if (spl.length > 1) {
    if (!NumberUtils.isDigits(spl[1])) {
      plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
    }
 else {
      maxHomes=Math.max(maxHomes,Integer.valueOf(spl[1]));
    }
  }
}
}
if (maxHomes < 1) {
maxHomes=1;
}
}
if (number > maxHomes) {
if (maxHomes > 1) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).setHomeerrorNumHomes.replace("String_Node_Str",String.valueOf(maxHomes)));
}
 else {
plugin.getGrid().homeTeleport(player,1);
}
}
 else {
plugin.getGrid().homeTeleport(player,number);
}
}
}
 catch (Exception e) {
plugin.getGrid().homeTeleport(player,1);
}
if (Settings.islandRemoveMobs) {
plugin.getGrid().removeMobs(player.getLocation());
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIsland);
return true;
}
int maxHomes=Settings.maxHomes;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
maxHomes=Settings.maxHomes;
break;
}
 else {
String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
if (spl.length > 1) {
if (!NumberUtils.isDigits(spl[1])) {
  plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
}
 else {
  maxHomes=Math.max(maxHomes,Integer.valueOf(spl[1]));
}
}
}
}
if (maxHomes < 1) {
maxHomes=1;
}
}
if (maxHomes > 1) {
int number=0;
try {
number=Integer.valueOf(split[1]);
if (number < 1 || number > maxHomes) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).setHomeerrorNumHomes.replace("String_Node_Str",String.valueOf(maxHomes)));
}
 else {
plugin.getGrid().homeSet(player,number);
}
}
 catch (Exception e) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).setHomeerrorNumHomes.replace("String_Node_Str",String.valueOf(maxHomes)));
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
final Set<UUID> warpList=plugin.getWarpSignsListener().listWarps();
if (warpList.isEmpty()) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).warpserrorNoWarpsYet);
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale().warpswarpTip);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
}
return true;
}
 else {
UUID foundWarp=null;
for (UUID warp : warpList) {
if (warp == null) continue;
if (plugin.getPlayers().getName(warp) != null) {
if (plugin.getPlayers().getName(warp).toLowerCase().equals(split[1].toLowerCase())) {
foundWarp=warp;
break;
}
 else if (plugin.getPlayers().getName(warp).toLowerCase().startsWith(split[1].toLowerCase())) {
foundWarp=warp;
}
}
}
if (foundWarp == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorDoesNotExist);
return true;
}
 else {
final Location warpSpot=plugin.getWarpSignsListener().getWarp(foundWarp);
if (warpSpot == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorNotReadyYet);
plugin.getLogger().warning("String_Node_Str" + plugin.getPlayers().getName(foundWarp));
return true;
}
Island island=plugin.getGrid().getIslandAt(warpSpot);
if (island != null && plugin.getPlayers().isBanned(island.getOwner(),playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).banBanned.replace("String_Node_Str",plugin.getPlayers().getName(island.getOwner())));
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && !VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
return true;
}
}
if (island != null && island.isLocked() && !player.isOp() && !VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && !VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).lockIslandLocked);
if (!plugin.getGrid().locationIsAtHome(player,true,warpSpot)) {
return true;
}
}
boolean pvp=false;
if (island != null && ((warpSpot.getWorld().equals(ASkyBlock.getIslandWorld()) && island.getIgsFlag(SettingsFlag.PVP)) || (warpSpot.getWorld().equals(ASkyBlock.getNetherWorld()) && island.getIgsFlag(SettingsFlag.NETHER_PVP)))) {
pvp=true;
}
Block b=warpSpot.getBlock();
if (b.getType().equals(Material.SIGN_POST) || b.getType().equals(Material.WALL_SIGN)) {
Sign sign=(Sign)b.getState();
org.bukkit.material.Sign s=(org.bukkit.material.Sign)sign.getData();
BlockFace directionFacing=s.getFacing();
Location inFront=b.getRelative(directionFacing).getLocation();
Location oneDown=b.getRelative(directionFacing).getRelative(BlockFace.DOWN).getLocation();
if ((GridManager.isSafeLocation(inFront))) {
warpPlayer(player,inFront,foundWarp,directionFacing,pvp);
return true;
}
 else if (b.getType().equals(Material.WALL_SIGN) && GridManager.isSafeLocation(oneDown)) {
warpPlayer(player,oneDown,foundWarp,directionFacing,pvp);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorDoesNotExist);
plugin.getWarpSignsListener().removeWarp(warpSpot);
return true;
}
if (!(GridManager.isSafeLocation(warpSpot))) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).warpserrorNotSafe);
if (b.getType().equals(Material.SIGN_POST)) {
plugin.getLogger().warning("String_Node_Str" + warpSpot.toString() + "String_Node_Str"+ plugin.getPlayers().getName(foundWarp));
}
return true;
}
 else {
final Location actualWarp=new Location(warpSpot.getWorld(),warpSpot.getBlockX() + 0.5D,warpSpot.getBlockY(),warpSpot.getBlockZ() + 0.5D);
player.teleport(actualWarp);
if (pvp) {
Util.sendMessage(player,ChatColor.BOLD + "String_Node_Str" + ChatColor.RED+ plugin.myLocale(player.getUniqueId()).igs.get(SettingsFlag.PVP)+ "String_Node_Str"+ plugin.myLocale(player.getUniqueId()).igsAllowed);
if (plugin.getServer().getVersion().contains("String_Node_Str") || plugin.getServer().getVersion().contains("String_Node_Str")) {
  player.getWorld().playSound(player.getLocation(),Sound.valueOf("String_Node_Str"),1F,1F);
}
 else {
  player.getWorld().playSound(player.getLocation(),Sound.ENTITY_ARROW_HIT,1F,1F);
}
}
 else {
if (plugin.getServer().getVersion().contains("String_Node_Str") || plugin.getServer().getVersion().contains("String_Node_Str")) {
  player.getWorld().playSound(player.getLocation(),Sound.valueOf("String_Node_Str"),1F,1F);
}
 else {
  player.getWorld().playSound(player.getLocation(),Sound.ENTITY_BAT_TAKEOFF,1F,1F);
}
}
return true;
}
}
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
final UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().hasIsland(targetPlayerUUID) || plugin.getPlayers().inTeam(targetPlayerUUID)) {
calculateIslandLevel(player,targetPlayerUUID);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIslandOther);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Player invitedPlayer=plugin.getServer().getPlayer(split[1]);
if (invitedPlayer == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorOfflinePlayer);
return true;
}
final UUID invitedPlayerUUID=invitedPlayer.getUniqueId();
if (!plugin.getPlayers().hasIsland(player.getUniqueId())) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
return true;
}
if (player.getUniqueId().equals(invitedPlayer.getUniqueId())) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouCannotInviteYourself);
return true;
}
long time=plugin.getPlayers().getInviteCoolDownTime(invitedPlayerUUID,plugin.getPlayers().getIslandLocation(playerUUID));
if (time > 0 && !player.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorCoolDown.replace("String_Node_Str",String.valueOf(time)));
return true;
}
if (plugin.getPlayers().inTeam(player.getUniqueId())) {
if (teamLeader.equals(player.getUniqueId())) {
if (!plugin.getPlayers().inTeam(invitedPlayerUUID)) {
int maxSize=Settings.maxTeamSize;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
  if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
    maxSize=Settings.maxTeamSize;
    break;
  }
 else {
    String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
    if (spl.length > 1) {
      if (!NumberUtils.isDigits(spl[1])) {
        plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
      }
 else {
        maxSize=Math.max(maxSize,Integer.valueOf(spl[1]));
      }
    }
  }
}
if (maxSize < 1) {
  maxSize=1;
}
}
if (teamMembers.size() < maxSize) {
if (inviteList.containsValue(playerUUID)) {
  inviteList.remove(getKeyByValue(inviteList,player.getUniqueId()));
  Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
inviteList.put(invitedPlayerUUID,player.getUniqueId());
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteinviteSentTo.replace("String_Node_Str",invitedPlayer.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),plugin.myLocale(invitedPlayerUUID).invitenameHasInvitedYou.replace("String_Node_Str",player.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.WHITE + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str"+ plugin.myLocale(invitedPlayerUUID).invitetoAcceptOrReject);
if (plugin.getPlayers().hasIsland(invitedPlayerUUID)) {
  Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.RED + plugin.myLocale(invitedPlayerUUID).invitewarningYouWillLoseIsland);
}
if (Settings.inviteTimeout > 0) {
  plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
    @Override public void run(){
      if (inviteList.containsKey(invitedPlayerUUID) && inviteList.get(invitedPlayerUUID).equals(playerUUID)) {
        inviteList.remove(invitedPlayerUUID);
        if (plugin.getServer().getPlayer(playerUUID) != null) {
          Util.sendMessage(plugin.getServer().getPlayer(playerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
        }
        if (plugin.getServer().getPlayer(invitedPlayerUUID) != null) {
          Util.sendMessage(plugin.getServer().getPlayer(invitedPlayerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
        }
      }
    }
  }
,Settings.inviteTimeout);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYourIslandIsFull);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorThatPlayerIsAlreadyInATeam);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
}
}
 else {
if (!plugin.getPlayers().inTeam(invitedPlayerUUID)) {
if (inviteList.containsValue(playerUUID)) {
inviteList.remove(getKeyByValue(inviteList,player.getUniqueId()));
Util.sendMessage(player,ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
inviteList.put(invitedPlayerUUID,player.getUniqueId());
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteinviteSentTo.replace("String_Node_Str",invitedPlayer.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),plugin.myLocale(invitedPlayerUUID).invitenameHasInvitedYou.replace("String_Node_Str",player.getName()));
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.WHITE + "String_Node_Str" + label+ "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str"+ plugin.myLocale(invitedPlayerUUID).invitetoAcceptOrReject);
if (plugin.getPlayers().hasIsland(invitedPlayerUUID)) {
Util.sendMessage(Bukkit.getPlayer(invitedPlayerUUID),ChatColor.RED + plugin.myLocale(invitedPlayerUUID).invitewarningYouWillLoseIsland);
}
if (Settings.inviteTimeout > 0) {
plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
@Override public void run(){
  if (inviteList.containsKey(invitedPlayerUUID) && inviteList.get(invitedPlayerUUID).equals(playerUUID)) {
    inviteList.remove(invitedPlayerUUID);
    if (plugin.getServer().getPlayer(playerUUID) != null) {
      Util.sendMessage(plugin.getServer().getPlayer(playerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
    }
    if (plugin.getServer().getPlayer(invitedPlayerUUID) != null) {
      Util.sendMessage(plugin.getServer().getPlayer(invitedPlayerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
    }
  }
}
}
,Settings.inviteTimeout);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorThatPlayerIsAlreadyInATeam);
}
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
Player target=plugin.getServer().getPlayer(split[1]);
if (target == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorOfflinePlayer);
return true;
}
final UUID targetPlayerUUID=target.getUniqueId();
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouMustHaveIslandToInvite);
return true;
}
if (playerUUID.equals(targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorYouCannotInviteYourself);
return true;
}
if (plugin.getPlayers().getMembers(playerUUID).contains(targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).coopOnYourTeam);
return true;
}
if (!plugin.getPlayers().inTeam(targetPlayerUUID)) {
if (!plugin.getPlayers().hasIsland(targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIslandOther);
return true;
}
}
long time=plugin.getPlayers().getInviteCoolDownTime(targetPlayerUUID,plugin.getPlayers().getIslandLocation(playerUUID));
if (time > 0 && !player.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).inviteerrorCoolDown.replace("String_Node_Str",String.valueOf(time)));
return true;
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).inviteinviteSentTo.replace("String_Node_Str",target.getName()));
Util.sendMessage(target,ChatColor.GREEN + plugin.myLocale(targetPlayerUUID).coopHasInvited.replace("String_Node_Str",player.getName()));
Util.sendMessage(target,ChatColor.GREEN + Settings.ISLANDCOMMAND + "String_Node_Str"+ plugin.myLocale(targetPlayerUUID).invitetoAcceptOrReject);
coopInviteList.put(targetPlayerUUID,playerUUID);
if (Settings.inviteTimeout > 0) {
plugin.getServer().getScheduler().runTaskLater(plugin,new Runnable(){
@Override public void run(){
if (coopInviteList.containsKey(targetPlayerUUID) && coopInviteList.get(targetPlayerUUID).equals(playerUUID)) {
coopInviteList.remove(targetPlayerUUID);
if (plugin.getServer().getPlayer(playerUUID) != null) {
Util.sendMessage(plugin.getServer().getPlayer(playerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
if (plugin.getServer().getPlayer(targetPlayerUUID) != null) {
Util.sendMessage(plugin.getServer().getPlayer(targetPlayerUUID),ChatColor.YELLOW + plugin.myLocale(player.getUniqueId()).inviteremovingInvite);
}
}
}
}
,Settings.inviteTimeout);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelNotYourself);
return true;
}
Player target=plugin.getServer().getPlayer(targetPlayerUUID);
if (target != null) {
if (target.isOp() || VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str") || VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelFail.replace("String_Node_Str",target.getName()));
return true;
}
}
boolean coop=CoopPlay.getInstance().removeCoopPlayer(player,targetPlayerUUID);
if (coop) {
if (target != null) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).coopRemoved.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.RED + plugin.myLocale(targetPlayerUUID).coopRemoved.replace("String_Node_Str",player.getName()));
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).coopRemoveSuccess.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayerUUID)));
}
if (target != null && plugin.getGrid().isOnIsland(player,target)) {
if (plugin.getPlayers().inTeam(targetPlayerUUID) || plugin.getPlayers().hasIsland(targetPlayerUUID)) {
plugin.getGrid().homeTeleport(target);
}
 else {
if (!target.performCommand(Settings.SPAWNCOMMAND)) {
target.teleport(player.getWorld().getSpawnLocation());
}
}
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).expelExpelled);
plugin.getLogger().info(player.getName() + "String_Node_Str" + target.getName()+ "String_Node_Str");
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).expelSuccess.replace("String_Node_Str",target.getName()));
}
 else if (!coop) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelNotOnIsland);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).expelNotYourself);
return true;
}
OfflinePlayer target=plugin.getServer().getOfflinePlayer(targetPlayerUUID);
boolean coop=CoopPlay.getInstance().removeCoopPlayer(player,targetPlayerUUID);
if (coop) {
if (target != null && target.isOnline()) {
Util.sendMessage(target.getPlayer(),ChatColor.RED + plugin.myLocale(target.getUniqueId()).coopRemoved.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.RED + plugin.myLocale(targetPlayerUUID).coopRemoved.replace("String_Node_Str",player.getName()));
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).coopRemoveSuccess.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayerUUID)));
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).coopNotInCoop.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayerUUID)));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
final UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotYourself);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID) && plugin.getPlayers().inTeam(targetPlayerUUID)) {
if (plugin.getPlayers().getTeamLeader(playerUUID).equals(plugin.getPlayers().getTeamLeader(targetPlayerUUID))) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotTeamMember);
return true;
}
}
if (plugin.getPlayers().isBanned(playerUUID,targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).banAlreadyBanned.replace("String_Node_Str",split[1]));
return true;
}
Player target=plugin.getServer().getPlayer(targetPlayerUUID);
OfflinePlayer offlineTarget=plugin.getServer().getOfflinePlayer(targetPlayerUUID);
if (offlineTarget.isOp()) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banFail.replace("String_Node_Str",split[1]));
return true;
}
if (target != null) {
if (VaultHelper.checkPerm(target,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banFail.replace("String_Node_Str",split[1]));
return true;
}
boolean coop=CoopPlay.getInstance().removeCoopPlayer(player,target);
if (coop) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).coopRemoved.replace("String_Node_Str",player.getName()));
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).coopRemoveSuccess.replace("String_Node_Str",target.getName()));
}
if (plugin.getGrid().isOnIsland(player,target)) {
if (plugin.getPlayers().inTeam(targetPlayerUUID) || plugin.getPlayers().hasIsland(targetPlayerUUID)) {
plugin.getGrid().homeTeleport(target);
}
 else {
if (!target.performCommand(Settings.SPAWNCOMMAND)) {
target.teleport(player.getWorld().getSpawnLocation());
}
}
}
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(targetPlayerUUID).banBanned.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.RED + plugin.myLocale(targetPlayerUUID).banBanned.replace("String_Node_Str",player.getName()));
}
plugin.getLogger().info(player.getName() + "String_Node_Str" + split[1]+ "String_Node_Str");
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banSuccess.replace("String_Node_Str",split[1]));
plugin.getMessages().tellTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banSuccess.replace("String_Node_Str",split[1]));
plugin.getMessages().tellOfflineTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banSuccess.replace("String_Node_Str",split[1]));
plugin.getPlayers().ban(playerUUID,targetPlayerUUID);
plugin.getGrid().saveGrid();
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
final UUID targetPlayerUUID=plugin.getPlayers().getUUID(split[1]);
if (targetPlayerUUID == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayerUUID.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotYourself);
return true;
}
if (!plugin.getPlayers().isBanned(playerUUID,targetPlayerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).banNotBanned.replace("String_Node_Str",split[1]));
return true;
}
Player target=plugin.getServer().getPlayer(targetPlayerUUID);
if (target != null) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(target.getUniqueId()).banLifted.replace("String_Node_Str",player.getName()));
}
 else {
plugin.getMessages().setMessage(targetPlayerUUID,ChatColor.GREEN + plugin.myLocale(targetPlayerUUID).banLifted.replace("String_Node_Str",player.getName()));
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banLiftedSuccess.replace("String_Node_Str",split[1]));
plugin.getLogger().info(player.getName() + "String_Node_Str" + split[1]+ "String_Node_Str");
plugin.getMessages().tellTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banLiftedSuccess.replace("String_Node_Str",split[1]));
plugin.getMessages().tellOfflineTeam(playerUUID,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).banLiftedSuccess.replace("String_Node_Str",split[1]));
plugin.getPlayers().unBan(playerUUID,targetPlayerUUID);
plugin.getGrid().saveGrid();
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNoTeam);
return true;
}
if (teamLeader != null && !teamLeader.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorOnlyLeaderCan);
return true;
}
targetPlayer=null;
for (UUID member : teamMembers) {
if (plugin.getPlayers().getName(member).equalsIgnoreCase(split[1])) {
targetPlayer=member;
}
}
if (targetPlayer == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNotPartOfTeam);
return true;
}
if (teamMembers.contains(targetPlayer)) {
if (player.getUniqueId().equals(targetPlayer)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).leaveerrorLeadersCannotLeave);
return true;
}
if (!removePlayerFromTeam(targetPlayer,teamLeader)) {
return true;
}
plugin.getPlayers().startInviteCoolDownTimer(targetPlayer,plugin.getPlayers().getIslandLocation(playerUUID));
if (Settings.resetChallenges) {
plugin.getPlayers().resetAllChallenges(targetPlayer,false);
}
plugin.getPlayers().setIslandLevel(targetPlayer,0);
TopTen.topTenAddEntry(playerUUID,0);
Player target=plugin.getServer().getPlayer(targetPlayer);
if (target != null) {
Util.sendMessage(target,ChatColor.RED + plugin.myLocale(targetPlayer).kicknameRemovedYou.replace("String_Node_Str",player.getName()));
CoopPlay.getInstance().clearMyInvitedCoops(target);
CoopPlay.getInstance().clearMyCoops(target);
if (target.getWorld().equals(ASkyBlock.getIslandWorld())) {
if (!Settings.kickedKeepInv) {
for (ItemStack i : target.getInventory().getContents()) {
  if (i != null) {
    try {
      Item drop=player.getWorld().dropItemNaturally(player.getLocation(),i);
      PlayerDropItemEvent event=new PlayerDropItemEvent(target,drop);
      plugin.getServer().getPluginManager().callEvent(event);
    }
 catch (    Exception e) {
    }
  }
}
target.getInventory().clear();
target.getInventory().setArmorContents(null);
target.getInventory().setHelmet(null);
target.getInventory().setChestplate(null);
target.getInventory().setLeggings(null);
target.getInventory().setBoots(null);
target.getEquipment().clear();
target.updateInventory();
}
}
if (!target.performCommand(Settings.SPAWNCOMMAND)) {
target.teleport(ASkyBlock.getIslandWorld().getSpawnLocation());
}
}
 else {
if (DEBUG) plugin.getLogger().info("String_Node_Str" + targetPlayer.toString());
plugin.getMessages().setMessage(targetPlayer,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kicknameRemovedYou.replace("String_Node_Str",player.getName()));
}
plugin.getWarpSignsListener().removeWarp(targetPlayer);
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kicknameRemoved.replace("String_Node_Str",split[1]));
teamMembers.remove(targetPlayer);
if (teamMembers.size() < 2) {
if (!removePlayerFromTeam(player.getUniqueId(),teamLeader)) {
return true;
}
}
plugin.getPlayers().save(targetPlayer);
}
 else {
plugin.getLogger().warning("String_Node_Str" + player.getName() + "String_Node_Str"+ plugin.getPlayers().getName(targetPlayer));
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).kickerrorNotPartOfTeam);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
targetPlayer=plugin.getPlayers().getUUID(split[1]);
if (targetPlayer == null) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
if (targetPlayer.equals(playerUUID)) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorGeneralError);
return true;
}
if (!plugin.getPlayers().inTeam(player.getUniqueId())) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorYouMustBeInTeam);
return true;
}
if (plugin.getPlayers().getMembers(player.getUniqueId()).size() > 2) {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorRemoveAllPlayersFirst);
plugin.getLogger().info(player.getName() + "String_Node_Str");
return true;
}
if (plugin.getPlayers().inTeam(player.getUniqueId())) {
if (teamLeader.equals(player.getUniqueId())) {
if (teamMembers.contains(targetPlayer)) {
if (!removePlayerFromTeam(targetPlayer,teamLeader,true)) {
return true;
}
if (!removePlayerFromTeam(teamLeader,teamLeader,true)) {
return true;
}
Util.sendMessage(player,ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).makeLeadernameIsNowTheOwner.replace("String_Node_Str",plugin.getPlayers().getName(targetPlayer)));
plugin.getGrid().transferIsland(player.getUniqueId(),targetPlayer);
addPlayertoTeam(player.getUniqueId(),targetPlayer);
addPlayertoTeam(targetPlayer,targetPlayer);
Player target=plugin.getServer().getPlayer(targetPlayer);
if (target == null) {
plugin.getMessages().setMessage(targetPlayer,plugin.myLocale(player.getUniqueId()).makeLeaderyouAreNowTheOwner);
}
 else {
Util.sendMessage(plugin.getServer().getPlayer(targetPlayer),ChatColor.GREEN + plugin.myLocale(targetPlayer).makeLeaderyouAreNowTheOwner);
boolean hasARangePerm=false;
int range=Settings.islandProtectionRange;
Island islandByOwner=plugin.getGrid().getIsland(targetPlayer);
if (islandByOwner.getProtectionSize() == 0) {
  plugin.getLogger().warning("String_Node_Str" + player.getName() + "String_Node_Str"+ range);
  islandByOwner.setProtectionSize(range);
}
for (PermissionAttachmentInfo perms : target.getEffectivePermissions()) {
  if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
    if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
      break;
    }
 else {
      String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
      if (spl.length > 1) {
        if (!NumberUtils.isDigits(spl[1])) {
          plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
        }
 else {
          hasARangePerm=true;
          range=Math.max(range,Integer.valueOf(spl[1]));
        }
      }
    }
  }
}
if (hasARangePerm) {
  if (range % 2 != 0) {
    range--;
  }
  if (range != islandByOwner.getProtectionSize()) {
    Util.sendMessage(player,ChatColor.GOLD + plugin.myLocale(targetPlayer).adminSetRangeUpdated.replace("String_Node_Str",String.valueOf(range)));
    Util.sendMessage(target,ChatColor.GOLD + plugin.myLocale(targetPlayer).adminSetRangeUpdated.replace("String_Node_Str",String.valueOf(range)));
    plugin.getLogger().info("String_Node_Str" + islandByOwner.getProtectionSize() + "String_Node_Str"+ range+ "String_Node_Str"+ player.getName()+ "String_Node_Str");
  }
  islandByOwner.setProtectionSize(range);
}
}
plugin.getGrid().saveGrid();
return true;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorThatPlayerIsNotInTeam);
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorNotYourIsland);
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).makeLeadererrorGeneralError);
}
return true;
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
}
 else {
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}
break;
}
Util.sendMessage(player,ChatColor.RED + plugin.myLocale(playerUUID).errorUnknownCommand);
return true;
}