Program: 33985
Project: 33985
Buggy source:
@Override public boolean onCommand(final CommandSender sender,final Command command,final String label,final String[] split){
  Player player;
  if (sender instanceof Player) {
    player=(Player)sender;
    if (split.length > 0) {
      if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")) {
        if (!checkAdminPerms(player,split)) {
          player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
          return true;
        }
      }
 else {
        if (!checkModPerms(player,split)) {
          player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
          return true;
        }
      }
    }
  }
  if (split.length > 1 && split[0].equalsIgnoreCase("String_Node_Str")) {
    final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
    if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
      sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
      return true;
    }
 else {
      if (split.length == 2) {
        sender.sendMessage(plugin.getGrid().getIslandName(playerUUID));
      }
 else {
        String name=split[2];
        for (int i=3; i < split.length; i++) {
          name=name + "String_Node_Str" + split[i];
        }
        if (name.length() < Settings.minNameLength) {
          sender.sendMessage(ChatColor.RED + (plugin.myLocale().errorTooShort).replace("String_Node_Str",String.valueOf(Settings.minNameLength)));
          return true;
        }
        if (name.length() > Settings.maxNameLength) {
          sender.sendMessage(ChatColor.RED + (plugin.myLocale().errorTooLong).replace("String_Node_Str",String.valueOf(Settings.maxNameLength)));
          return true;
        }
        plugin.getGrid().setIslandName(playerUUID,ChatColor.translateAlternateColorCodes('&',name));
        sender.sendMessage(ChatColor.GREEN + plugin.myLocale().generalSuccess);
      }
      return true;
    }
  }
switch (split.length) {
case 0:
    help(sender,label);
  return true;
case 1:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(ChatColor.YELLOW + label + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str"+ plugin.myLocale().adminHelpsetDeaths);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(ChatColor.RED + plugin.myLocale().adminHelpSettingsReset);
  return true;
}
 else if (Settings.teamChat && split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
    return true;
  }
  player=(Player)sender;
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") || player.isOp()) {
    if (plugin.getChatListener().toggleSpy(player.getUniqueId())) {
      sender.sendMessage(ChatColor.GREEN + plugin.myLocale().teamChatStatusOn);
    }
 else {
      sender.sendMessage(ChatColor.GREEN + plugin.myLocale().teamChatStatusOff);
    }
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
    return true;
  }
  player=(Player)sender;
  Island island=plugin.getGrid().getIslandAt(player.getLocation());
  if (island == null) {
    player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNotOnIsland);
    return true;
  }
 else {
    Player owner=plugin.getServer().getPlayer(island.getOwner());
    if (island.isLocked()) {
      sender.sendMessage(ChatColor.RED + plugin.myLocale().lockUnlocking);
      island.setLocked(false);
      if (owner != null) {
        owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminUnlockedIsland);
      }
 else {
        plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminUnlockedIsland);
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + plugin.myLocale().lockLocking);
      island.setLocked(true);
      if (owner != null) {
        owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminLockedIsland);
      }
 else {
        plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminLockedIsland);
      }
    }
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(plugin.myLocale().adminTopBreedersFinding);
  sender.sendMessage(plugin.myLocale().adminTopBreedersChecking.replace("String_Node_Str",String.valueOf(plugin.getGrid().getOwnershipMap().size())));
  final List<Entity> allEntities=ASkyBlock.getIslandWorld().getEntities();
  final World islandWorld=ASkyBlock.getIslandWorld();
  final World netherWorld=ASkyBlock.getNetherWorld();
  plugin.getServer().getScheduler().runTaskAsynchronously(plugin,new Runnable(){
    @Override public void run(){
      Map<UUID,Multiset<EntityType>> result=new HashMap<UUID,Multiset<EntityType>>();
      for (      Entity entity : allEntities) {
        if (entity.getLocation().getWorld().equals(islandWorld) || entity.getLocation().getWorld().equals(netherWorld)) {
          if (entity instanceof Creature && !(entity instanceof Player)) {
            Island island=plugin.getGrid().getIslandAt(entity.getLocation());
            if (island != null && !island.isSpawn()) {
              UUID owner=island.getOwner();
              Multiset<EntityType> count=result.get(owner);
              if (count == null) {
                count=HashMultiset.create();
              }
              count.add(entity.getType());
              result.put(owner,count);
            }
          }
        }
      }
      TreeMap<Integer,List<UUID>> topEntityIslands=new TreeMap<Integer,List<UUID>>();
      for (      Entry<UUID,Multiset<EntityType>> entry : result.entrySet()) {
        int numOfEntities=entry.getValue().size();
        List<UUID> players=topEntityIslands.get(numOfEntities);
        if (players == null) {
          players=new ArrayList<UUID>();
        }
        players.add(entry.getKey());
        topEntityIslands.put(numOfEntities,players);
      }
      final TreeMap<Integer,List<UUID>> topBreeders=topEntityIslands;
      final Map<UUID,Multiset<EntityType>> finalResult=result;
      plugin.getServer().getScheduler().runTask(plugin,new Runnable(){
        @Override public void run(){
          if (topBreeders.isEmpty()) {
            sender.sendMessage(plugin.myLocale().adminTopBreedersNothing);
            return;
          }
          int rank=1;
          for (          int numOfEntities : topBreeders.descendingKeySet()) {
            if (numOfEntities > 5) {
              List<UUID> owners=topBreeders.get(numOfEntities);
              for (              UUID owner : owners) {
                sender.sendMessage("String_Node_Str" + rank + "String_Node_Str"+ plugin.getPlayers().getName(owner)+ "String_Node_Str"+ numOfEntities);
                String content="String_Node_Str";
                Multiset<EntityType> entityCount=finalResult.get(owner);
                for (                EntityType entity : entityCount.elementSet()) {
                  int num=entityCount.count(entity);
                  String color=ChatColor.GREEN.toString();
                  if (num > 10 && num <= 20) {
                    color=ChatColor.YELLOW.toString();
                  }
 else                   if (num > 20 && num <= 40) {
                    color=ChatColor.GOLD.toString();
                  }
 else                   if (num > 40) {
                    color=ChatColor.RED.toString();
                  }
                  content+=Util.prettifyText(entity.toString()) + "String_Node_Str" + color+ num+ ChatColor.WHITE+ "String_Node_Str";
                }
                int lastComma=content.lastIndexOf("String_Node_Str");
                if (lastComma > 0) {
                  content=content.substring(0,lastComma);
                }
                sender.sendMessage("String_Node_Str" + content);
              }
              rank++;
              if (rank > 10) {
                break;
              }
            }
          }
          if (rank == 1) {
            sender.sendMessage(plugin.myLocale().adminTopBreedersNothing);
          }
        }
      }
);
    }
  }
);
  return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslandError);
return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
player=(Player)sender;
if (!player.getLocation().getWorld().getName().equals(Settings.worldName)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorWrongWorld);
return true;
}
Location closestIsland=getClosestIsland(player.getLocation());
Island oldSpawn=plugin.getGrid().getSpawn();
Island newSpawn=plugin.getGrid().getIslandAt(closestIsland);
if (newSpawn != null && newSpawn.isSpawn()) {
plugin.getGrid().setSpawnPoint(player.getLocation());
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetSpawnset);
return true;
}
if (newSpawn != null && newSpawn.getOwner() != null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnownedBy.replace("String_Node_Str",plugin.getPlayers().getName(newSpawn.getOwner())));
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnmove);
return true;
}
if (oldSpawn != null) {
sender.sendMessage(ChatColor.GOLD + "String_Node_Str" + oldSpawn.getCenter().getBlockX()+ "String_Node_Str"+ oldSpawn.getCenter().getBlockZ()+ "String_Node_Str");
plugin.getGrid().deleteSpawn();
}
if (newSpawn == null) {
newSpawn=plugin.getGrid().addIsland(closestIsland.getBlockX(),closestIsland.getBlockZ());
}
plugin.getGrid().setSpawn(newSpawn);
plugin.getGrid().setSpawnPoint(player.getLocation());
player.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetSpawnsetting.replace("String_Node_Str",player.getLocation().getBlockX() + "String_Node_Str" + player.getLocation().getBlockZ()));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncenter.replace("String_Node_Str",newSpawn.getCenter().getBlockX() + "String_Node_Str" + newSpawn.getCenter().getBlockZ()));
player.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawnlimits.replace("String_Node_Str",newSpawn.getMinX() + "String_Node_Str" + newSpawn.getMinZ())).replace("String_Node_Str",(newSpawn.getMinX() + newSpawn.getIslandDistance() - 1) + "String_Node_Str" + (newSpawn.getMinZ() + newSpawn.getIslandDistance() - 1)));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnrange.replace("String_Node_Str",String.valueOf(newSpawn.getProtectionSize())));
player.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawncoords.replace("String_Node_Str",newSpawn.getMinProtectedX() + "String_Node_Str" + newSpawn.getMinProtectedZ())).replace("String_Node_Str",+(newSpawn.getMinProtectedX() + newSpawn.getProtectionSize() - 1) + "String_Node_Str" + (newSpawn.getMinProtectedZ() + newSpawn.getProtectionSize() - 1)));
if (newSpawn.isLocked()) {
player.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnlocked);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
Location closestIsland=getClosestIsland(((Player)sender).getLocation());
if (closestIsland == null) {
sender.sendMessage(ChatColor.RED + "String_Node_Str");
return true;
}
Island island=plugin.getGrid().getIslandAt(closestIsland);
if (island != null && island.isSpawn()) {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminInfotitle);
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncenter.replace("String_Node_Str",island.getCenter().getBlockX() + "String_Node_Str" + island.getCenter().getBlockZ()));
sender.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawnlimits.replace("String_Node_Str",island.getMinX() + "String_Node_Str" + island.getMinZ())).replace("String_Node_Str",(island.getMinX() + island.getIslandDistance() - 1) + "String_Node_Str" + (island.getMinZ() + island.getIslandDistance() - 1)));
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnrange.replace("String_Node_Str",String.valueOf(island.getProtectionSize())));
sender.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawncoords.replace("String_Node_Str",island.getMinProtectedX() + "String_Node_Str" + island.getMinProtectedZ())).replace("String_Node_Str",+(island.getMinProtectedX() + island.getProtectionSize() - 1) + "String_Node_Str" + (island.getMinProtectedZ() + island.getProtectionSize() - 1)));
if (island.isLocked()) {
  sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnlocked);
}
return true;
}
if (island == null) {
plugin.getLogger().info("String_Node_Str" + closestIsland);
}
UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestIsland);
if (target == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminInfounowned);
return true;
}
showInfo(target,sender);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
player=(Player)sender;
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && !player.isOp()) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
BlockIterator iter=new BlockIterator(player,10);
Block lastBlock=iter.next();
while (iter.hasNext()) {
lastBlock=iter.next();
if (lastBlock.getType() == Material.AIR) continue;
break;
}
if (!lastBlock.getType().equals(Material.SIGN_POST)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminResetSignNoSign);
return true;
}
Sign sign=(Sign)lastBlock.getState();
sender.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).adminResetSignFound);
UUID target=plugin.getPlayers().getPlayerFromIslandLocation(player.getLocation());
if (target == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminInfounowned);
return true;
}
if (plugin.getWarpSignsListener().addWarp(target,lastBlock.getLocation())) {
sign.setLine(0,ChatColor.GREEN + plugin.myLocale().warpswelcomeLine);
sign.update();
sender.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).adminResetSignRescued.replace("String_Node_Str",plugin.getPlayers().getName(target)));
return true;
}
sender.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminResetSignErrorExists.replace("String_Node_Str",plugin.getWarpSignsListener().getWarpOwner(lastBlock.getLocation())));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
plugin.reloadConfig();
plugin.loadPluginConfig();
plugin.getChallenges().reloadChallengeConfig();
if (Settings.useEconomy && VaultHelper.setupEconomy()) {
ControlPanel.loadShop();
}
 else {
Settings.useEconomy=false;
}
ControlPanel.loadControlPanel();
if (Settings.updateCheck) {
plugin.checkUpdates();
}
 else {
plugin.setUpdateCheck(null);
}
plugin.getIslandCmd().loadSchematics();
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().reloadconfigReloaded);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminTopTengenerating);
TopTen.topTenCreate(sender);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (purgeFlag) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgealreadyRunning);
return true;
}
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgeusage.replace("String_Node_Str",label));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!confirmReq) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().confirmerrorTimeLimitExpired);
return true;
}
 else {
confirmOK=true;
confirmReq=false;
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (asyncPending) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorCommandNotReady);
return true;
}
plugin.getPlayers().clearResets(Settings.resetLimit);
final File playerFolder=plugin.getPlayersFolder();
asyncPending=true;
plugin.getServer().getScheduler().runTaskAsynchronously(plugin,new Runnable(){
@Override public void run(){
  int done=0;
  FilenameFilter ymlFilter=new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      String lowercaseName=name.toLowerCase();
      if (lowercaseName.endsWith("String_Node_Str")) {
        return true;
      }
 else {
        return false;
      }
    }
  }
;
  for (  File file : playerFolder.listFiles(ymlFilter)) {
    List<String> playerFileContents=new ArrayList<String>();
    done++;
    try {
      Scanner scanner=new Scanner(file);
      while (scanner.hasNextLine()) {
        final String lineFromFile=scanner.nextLine();
        if (lineFromFile.contains("String_Node_Str")) {
          playerFileContents.add("String_Node_Str" + Settings.resetLimit);
        }
 else {
          playerFileContents.add(lineFromFile);
        }
      }
      scanner.close();
      FileWriter writer=new FileWriter(file);
      for (      String str : playerFileContents) {
        writer.write(str + "String_Node_Str");
      }
      writer.close();
      if (done % 500 == 0) {
        final int update=done;
        plugin.getServer().getScheduler().runTask(plugin,new Runnable(){
          @Override public void run(){
            sender.sendMessage(ChatColor.GREEN + plugin.myLocale().clearedResetLimit + "String_Node_Str"+ update+ "String_Node_Str");
          }
        }
);
      }
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
  }
  asyncPending=false;
  sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().clearedResetLimit + "String_Node_Str"+ done+ "String_Node_Str");
}
}
);
return true;
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return false;
}
case 2:
if (!plugin.getServer().getVersion().contains("String_Node_Str")) {
if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (playerUUID == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
if (sender instanceof Player) {
  plugin.getIslandCmd().calculateIslandLevel(sender,playerUUID,false);
}
 else {
  plugin.getIslandCmd().calculateIslandLevel(sender,playerUUID,true);
}
return true;
}
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (split[1].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().settingsResetInProgress);
plugin.getServer().getScheduler().runTaskAsynchronously(plugin,new Runnable(){
@Override public void run(){
for (Island island : plugin.getGrid().getOwnedIslands().values()) {
  island.setDefaults();
}
for (Island island : plugin.getGrid().getUnownedIslands().values()) {
  island.setDefaults();
}
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().settingsResetDone);
plugin.getGrid().saveGrid();
}
}
);
return true;
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminHelpSettingsReset);
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
Player p=(Player)sender;
if (!VaultHelper.checkPerm(p,Settings.PERMPREFIX + "String_Node_Str") && !p.isOp()) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).errorNoPermission);
return true;
}
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
BlockIterator iter=new BlockIterator(p,10);
Block lastBlock=iter.next();
while (iter.hasNext()) {
lastBlock=iter.next();
if (lastBlock.getType() == Material.AIR) continue;
break;
}
if (!lastBlock.getType().equals(Material.SIGN_POST)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).adminResetSignNoSign);
return true;
}
Sign sign=(Sign)lastBlock.getState();
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (!plugin.getGrid().getIslandAt(islandLoc).inIslandSpace(sign.getLocation())) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).adminSetHomeNotOnPlayersIsland);
}
 else {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminResetSignFound);
if (plugin.getWarpSignsListener().addWarp(playerUUID,lastBlock.getLocation())) {
sign.setLine(0,ChatColor.GREEN + plugin.myLocale().warpswelcomeLine);
sign.update();
p.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminResetSignRescued.replace("String_Node_Str",plugin.getPlayers().getName(playerUUID)));
return true;
}
sender.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).adminResetSignErrorExists.replace("String_Node_Str",plugin.getWarpSignsListener().getWarpOwner(lastBlock.getLocation())));
}
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!split[1].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslandError);
return true;
}
Island island=plugin.getGrid().getIslandAt(((Player)sender).getLocation());
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslandnoid);
return true;
}
UUID owner=island.getOwner();
String name="String_Node_Str";
if (owner != null) {
name=plugin.getPlayers().getName(owner);
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnownedBy.replace("String_Node_Str",name));
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslanduse.replace("String_Node_Str",name));
return true;
}
 else {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().deleteremoving.replace("String_Node_Str",name));
deleteIslands(island,sender);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
plugin.getGrid().setIslandName(playerUUID,null);
sender.sendMessage(plugin.myLocale().generalSuccess);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
Location safeHome=plugin.getGrid().getSafeHomeLocation(playerUUID,1);
if (safeHome == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetHomeNoneFound);
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,safeHome);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetHomeHomeSet.replace("String_Node_Str",safeHome.getBlockX() + "String_Node_Str" + safeHome.getBlockY()+ "String_Node_Str"+ safeHome.getBlockZ()));
}
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
return true;
}
player=(Player)sender;
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIslandOther);
return true;
}
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (!plugin.getGrid().getIslandAt(islandLoc).inIslandSpace(player.getLocation())) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminSetHomeNotOnPlayersIsland);
}
 else {
if (!GridManager.isSafeLocation(player.getLocation())) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminSetHomeNoneFound);
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,player.getLocation());
player.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).adminSetHomeHomeSet.replace("String_Node_Str",player.getLocation().getBlockX() + "String_Node_Str" + player.getLocation().getBlockY()+ "String_Node_Str"+ player.getLocation().getBlockZ()));
}
}
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
return true;
}
player=(Player)sender;
UUID playerUUID=player.getUniqueId();
Island island=plugin.getGrid().getIslandAt(player.getLocation());
if (island == null) {
player.sendMessage(ChatColor.RED + plugin.myLocale().errorNotOnIsland);
return true;
}
 else {
int newRange=10;
int maxRange=Settings.islandDistance;
if (island.isSpawn()) {
try {
newRange=Integer.valueOf(split[1]);
}
 catch (Exception e) {
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeInvalid);
return true;
}
player.sendMessage(ChatColor.GREEN + plugin.myLocale(playerUUID).adminSetRangeSet.replace("String_Node_Str",String.valueOf(newRange)));
if (newRange > maxRange) {
player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.BOLD+ plugin.myLocale(playerUUID).adminSetRangeWarning.replace("String_Node_Str",String.valueOf(maxRange)));
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeWarning2);
}
island.setProtectionSize(newRange);
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncenter.replace("String_Node_Str",island.getCenter().getBlockX() + "String_Node_Str" + island.getCenter().getBlockZ()));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnlimits.replace("String_Node_Str",island.getMinX() + "String_Node_Str" + island.getMinZ()).replace("String_Node_Str",(island.getMinX() + island.getIslandDistance() - 1) + "String_Node_Str" + (island.getMinZ() + island.getIslandDistance() - 1)));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnrange.replace("String_Node_Str",String.valueOf(island.getProtectionSize())));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncoords.replace("String_Node_Str",island.getMinProtectedX() + "String_Node_Str" + island.getMinProtectedZ()).replace("String_Node_Str",+(island.getMinProtectedX() + island.getProtectionSize() - 1) + "String_Node_Str" + (island.getMinProtectedZ() + island.getProtectionSize() - 1)));
if (island.isLocked()) {
player.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnlocked);
}
}
 else {
if (!plugin.getConfig().getBoolean("String_Node_Str")) {
maxRange-=16;
}
try {
newRange=Integer.valueOf(split[1]);
}
 catch (Exception e) {
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale(playerUUID).adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
if (newRange < 10 || newRange > maxRange) {
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale(playerUUID).adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
island.setProtectionSize(newRange);
player.sendMessage(ChatColor.GREEN + plugin.myLocale(playerUUID).adminSetRangeSet.replace("String_Node_Str",String.valueOf(newRange)));
showInfo(island.getOwner(),sender);
}
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (split[1].equalsIgnoreCase("String_Node_Str") || split[1].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
return true;
}
Player p=(Player)sender;
if (!p.getLocation().getWorld().equals(ASkyBlock.getIslandWorld()) && !p.getLocation().getWorld().equals(ASkyBlock.getNetherWorld())) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).errorWrongWorld);
return true;
}
Island island=plugin.getGrid().getIslandAt(p.getLocation());
if (island == null) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).errorNoIslandOther);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
island.setPurgeProtected(true);
}
 else {
island.setPurgeProtected(false);
}
if (island.isPurgeProtected()) {
p.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminAllowPurge);
}
 else {
p.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminPreventPurge);
}
return true;
}
if (purgeFlag) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgealreadyRunning);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
countUnowned(sender);
return true;
}
purgeFlag=true;
final int time;
try {
time=Integer.parseInt(split[1]) * 24;
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgeusage.replace("String_Node_Str",label));
purgeFlag=false;
return true;
}
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgecalculating.replace("String_Node_Str",split[1]));
for (Entry<UUID,Island> entry : plugin.getGrid().getOwnershipMap().entrySet()) {
if (entry.getKey() != null && !entry.getValue().isPurgeProtected()) {
if (Bukkit.getOfflinePlayer(entry.getKey()).hasPlayedBefore()) {
long offlineTime=Bukkit.getOfflinePlayer(entry.getKey()).getLastPlayed();
offlineTime=(System.currentTimeMillis() - offlineTime) / 3600000L;
if (offlineTime > time) {
removeList.add(entry.getKey());
}
}
 else {
removeList.add(entry.getKey());
}
}
}
if (removeList.isEmpty()) {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgenoneFound);
purgeFlag=false;
return true;
}
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgethisWillRemove.replace("String_Node_Str",String.valueOf(removeList.size())).replace("String_Node_Str",String.valueOf(Settings.abandonedIslandLevel)));
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgewarning);
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgetypeConfirm.replace("String_Node_Str",label));
confirmReq=true;
confirmOK=false;
confirmTimer=0;
new BukkitRunnable(){
@Override public void run(){
if (confirmTimer++ > 10) {
confirmReq=false;
confirmOK=false;
purgeFlag=false;
removeList.clear();
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgepurgeCancelled);
this.cancel();
}
 else if (confirmOK) {
final int total=removeList.size();
new BukkitRunnable(){
@Override public void run(){
if (removeList.isEmpty() && purgeFlag) {
  purgeFlag=false;
  sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgefinished);
  this.cancel();
}
if (removeList.size() > 0 && purgeFlag) {
  if (plugin.getServer().getPlayer(removeList.get(0)) == null) {
    if (plugin.getPlayers().getIslandLevel(removeList.get(0)) < Settings.abandonedIslandLevel) {
      sender.sendMessage(ChatColor.YELLOW + "String_Node_Str" + (total - removeList.size() + 1)+ "String_Node_Str"+ total+ "String_Node_Str"+ plugin.myLocale().purgeremovingName.replace("String_Node_Str",plugin.getPlayers().getName(removeList.get(0))));
      plugin.deletePlayerIsland(removeList.get(0),true);
    }
  }
 else {
    sender.sendMessage(ChatColor.YELLOW + "String_Node_Str" + (total - removeList.size() + 1)+ "String_Node_Str"+ total+ "String_Node_Str"+ "String_Node_Str");
  }
  removeList.remove(0);
}
}
}
.runTaskTimer(plugin,0L,20L);
confirmReq=false;
confirmOK=false;
this.cancel();
}
}
}
.runTaskTimer(plugin,0L,40L);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
Island island=plugin.getGrid().getIsland(playerUUID);
if (island != null) {
Player owner=plugin.getServer().getPlayer(island.getOwner());
if (island.isLocked()) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().lockUnlocking);
island.setLocked(false);
if (owner != null) {
owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminUnlockedIsland);
}
 else {
plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminUnlockedIsland);
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().lockLocking);
island.setLocked(true);
if (owner != null) {
owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminLockedIsland);
}
 else {
plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminLockedIsland);
}
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
}
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
sender.sendMessage(ChatColor.GREEN + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ plugin.getPlayers().getDeaths(playerUUID)+ "String_Node_Str"+ plugin.myLocale().deaths);
sender.sendMessage(ChatColor.YELLOW + label + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str"+ plugin.myLocale().adminHelpsetDeaths);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
plugin.getPlayers().setResetsLeft(playerUUID,Settings.resetLimit);
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().clearedResetLimit + "String_Node_Str"+ Settings.resetLimit+ "String_Node_Str");
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return true;
}
player=(Player)sender;
final UUID targetUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(targetUUID)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
 else {
if (plugin.getPlayers().hasIsland(targetUUID) || plugin.getPlayers().inTeam(targetUUID)) {
Location warpSpot=plugin.getPlayers().getIslandLocation(targetUUID).toVector().toLocation(ASkyBlock.getIslandWorld());
String failureMessage=ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminTpManualWarp.replace("String_Node_Str",warpSpot.getBlockX() + "String_Node_Str" + warpSpot.getBlockY()+ "String_Node_Str"+ warpSpot.getBlockZ());
Location home=plugin.getPlayers().getHomeLocation(targetUUID);
plugin.getGrid();
if (home.getWorld().equals(ASkyBlock.getIslandWorld()) && GridManager.isSafeLocation(home)) {
player.teleport(home);
return true;
}
new SafeSpotTeleport(plugin,player,warpSpot,failureMessage);
return true;
}
sender.sendMessage(plugin.myLocale().errorNoIslandOther);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!Settings.createNether || !Settings.newNether || ASkyBlock.getNetherWorld() == null) {
return false;
}
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return true;
}
player=(Player)sender;
final UUID targetUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(targetUUID)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
 else {
if (plugin.getPlayers().hasIsland(targetUUID) || plugin.getPlayers().inTeam(targetUUID)) {
Location warpSpot=plugin.getPlayers().getIslandLocation(targetUUID).toVector().toLocation(ASkyBlock.getNetherWorld());
String failureMessage=ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminTpManualWarp.replace("String_Node_Str",warpSpot.getBlockX() + "String_Node_Str" + warpSpot.getBlockY()+ "String_Node_Str"+ warpSpot.getBlockZ());
Location home=plugin.getPlayers().getHomeLocation(targetUUID);
plugin.getGrid();
if (home.getWorld().equals(ASkyBlock.getNetherWorld()) && GridManager.isSafeLocation(home)) {
player.teleport(home);
return true;
}
new SafeSpotTeleport(plugin,player,warpSpot,failureMessage);
return true;
}
sender.sendMessage(plugin.myLocale().errorNoIslandOther);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().deleteremoving.replace("String_Node_Str",split[1]));
Player target=plugin.getServer().getPlayer(playerUUID);
if (target != null) {
CoopPlay.getInstance().clearMyInvitedCoops(target);
CoopPlay.getInstance().clearMyCoops(target);
plugin.resetPlayer(target);
}
plugin.deletePlayerIsland(playerUUID,true);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (sender instanceof Player) {
player=(Player)sender;
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
Location islandLoc=plugin.getGrid().getClosestIsland(player.getLocation());
Island island=plugin.getGrid().getIslandAt(islandLoc);
if (island == null) {
plugin.getIslandCmd().reserveLocation(playerUUID,islandLoc);
sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + islandLoc.getBlockX()+ "String_Node_Str"+ islandLoc.getBlockZ()+ "String_Node_Str"+ plugin.myLocale().generalSuccess);
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminReserveIslandExists);
}
return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (sender instanceof Player) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
if (adminSetPlayerIsland(sender,((Player)sender).getLocation(),playerUUID)) {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().registersettingIsland.replace("String_Node_Str",split[1]));
plugin.getGrid().saveGrid();
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().registererrorBedrockNotFound);
}
return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
if (plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminUnregisterOnTeam);
return true;
}
Location island=plugin.getPlayers().getIslandLocation(playerUUID);
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminUnregisterKeepBlocks.replace("String_Node_Str",+plugin.getPlayers().getIslandLocation(playerUUID).getBlockX() + "String_Node_Str" + plugin.getPlayers().getIslandLocation(playerUUID).getBlockZ()));
plugin.deletePlayerIsland(playerUUID,false);
plugin.getGrid().saveGrid();
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
showInfo(playerUUID,sender);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
plugin.getPlayers().resetAllChallenges(playerUUID,true);
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().resetChallengessuccess.replace("String_Node_Str",split[1]));
return true;
}
 else {
return false;
}
case 3:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (purgeFlag) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgealreadyRunning);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str") && split[2].equalsIgnoreCase("String_Node_Str")) {
if (!purgeUnownedConfirm) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().confirmerrorTimeLimitExpired);
return true;
}
 else {
purgeUnownedConfirm=false;
purgeUnownedIslands(sender);
return true;
}
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
playerUUID=plugin.getPlayers().getTeamLeader(playerUUID);
}
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
 else {
int newRange=0;
int maxRange=Settings.islandDistance;
if (!plugin.getConfig().getBoolean("String_Node_Str")) {
maxRange-=16;
}
try {
newRange=Integer.valueOf(split[2]);
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale().adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
if (newRange < 10 || newRange > maxRange) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale().adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
island.setProtectionSize(newRange);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetRangeSet.replace("String_Node_Str",String.valueOf(newRange)));
showInfo(playerUUID,sender);
plugin.getGrid().saveGrid();
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
try {
int newDeaths=Integer.valueOf(split[2]);
int oldDeaths=plugin.getPlayers().getDeaths(playerUUID);
plugin.getPlayers().setDeaths(playerUUID,newDeaths);
sender.sendMessage(ChatColor.GREEN + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ oldDeaths+ "String_Node_Str"+ newDeaths+ "String_Node_Str"+ plugin.myLocale().deaths);
}
 catch (Exception e) {
sender.sendMessage(ChatColor.GREEN + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ plugin.getPlayers().getDeaths(playerUUID)+ "String_Node_Str"+ plugin.myLocale().deaths);
sender.sendMessage(ChatColor.YELLOW + label + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str"+ plugin.myLocale().adminHelpsetDeaths);
return true;
}
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
playerUUID=plugin.getPlayers().getTeamLeader(playerUUID);
}
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIsland);
return true;
}
Biome biome=null;
String biomeName=split[2].toUpperCase();
try {
biome=Biome.valueOf(biomeName);
biomeName=biome.name();
if (!plugin.getConfig().contains("String_Node_Str" + biomeName)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().biomeUnknown);
for (Biome b : Biome.values()) {
if (plugin.getConfig().contains("String_Node_Str" + b.name())) {
sender.sendMessage(b.name());
}
}
return true;
}
biomeName=plugin.getConfig().getString("String_Node_Str" + biomeName + "String_Node_Str",Util.prettifyText(biomeName));
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().biomeUnknown);
for (Biome b : Biome.values()) {
if (plugin.getConfig().contains("String_Node_Str" + b.name())) {
sender.sendMessage(b.name());
}
}
return true;
}
plugin.getBiomes().setIslandBiome(island,biome);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().biomeSet.replace("String_Node_Str",biomeName));
Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
if (targetPlayer != null) {
targetPlayer.sendMessage("String_Node_Str" + ChatColor.GREEN + plugin.myLocale(playerUUID).biomeSet.replace("String_Node_Str",biomeName));
}
 else {
plugin.getMessages().setMessage(playerUUID,"String_Node_Str" + ChatColor.GREEN + plugin.myLocale(playerUUID).biomeSet.replace("String_Node_Str",biomeName));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoTeam);
return true;
}
UUID teamLeader=plugin.getPlayers().getTeamLeader(playerUUID);
if (teamLeader == null) {
plugin.getPlayers().setLeaveTeam(playerUUID);
plugin.getPlayers().setHomeLocation(playerUUID,null);
plugin.getPlayers().setIslandLocation(playerUUID,null);
plugin.getWarpSignsListener().removeWarp(playerUUID);
sender.sendMessage(ChatColor.RED + plugin.myLocale().kicknameRemoved.replace("String_Node_Str",split[2]));
return true;
}
if (!teamLeader.equals(playerUUID)) {
plugin.getPlayers().setLeaveTeam(playerUUID);
plugin.getPlayers().setHomeLocation(playerUUID,null);
plugin.getPlayers().setIslandLocation(playerUUID,null);
plugin.getPlayers().removeMember(teamLeader,playerUUID);
if (plugin.getPlayers().getMembers(teamLeader).size() < 2) {
plugin.getPlayers().setLeaveTeam(teamLeader);
}
plugin.getWarpSignsListener().removeWarp(playerUUID);
sender.sendMessage(ChatColor.RED + plugin.myLocale().kicknameRemoved.replace("String_Node_Str",split[2]));
return true;
}
 else {
sender.sendMessage(ChatColor.RED + (plugin.myLocale().adminTeamKickLeader.replace("String_Node_Str",label)).replace("String_Node_Str",split[2]));
return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return false;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().checkChallenge(playerUUID,split[2].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[2].toLowerCase())) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().completeChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().get(playerUUID).completeChallenge(split[2].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().completeChallengechallangeCompleted.replace("String_Node_Str",split[2].toLowerCase()).replace("String_Node_Str",split[1]));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (!plugin.getPlayers().checkChallenge(playerUUID,split[2].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[2].toLowerCase())) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().resetChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().resetChallenge(playerUUID,split[2].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().resetChallengechallengeReset.replace("String_Node_Str",split[2].toLowerCase()).replace("String_Node_Str",split[1]));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") && split[1].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
showInfoChallenges(playerUUID,sender);
return true;
}
}
return false;
case 4:
if (split[0].equalsIgnoreCase("String_Node_Str") && split[1].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2],true);
final Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
final UUID teamLeader=plugin.getPlayers().getUUID(split[3],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID) || !plugin.getPlayers().isAKnownPlayer(teamLeader)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (playerUUID.equals(teamLeader)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminTeamAddLeaderToOwn);
return true;
}
if (!plugin.getPlayers().hasIsland(teamLeader)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminTeamAddLeaderNoIsland);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().inviteerrorThatPlayerIsAlreadyInATeam);
return true;
}
if (!plugin.getPlayers().getMembers(teamLeader).contains(teamLeader)) {
plugin.getPlayers().setJoinTeam(teamLeader,teamLeader,plugin.getPlayers().getIslandLocation(teamLeader));
plugin.getPlayers().addTeamMember(teamLeader,teamLeader);
sender.sendMessage(ChatColor.GOLD + plugin.myLocale().adminTeamAddedLeader);
}
if (targetPlayer != null) {
targetPlayer.performCommand(Settings.ISLANDCOMMAND + "String_Node_Str");
}
if (plugin.getPlayers().hasIsland(playerUUID)) {
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (islandLoc != null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminTeamNowUnowned.replace("String_Node_Str",plugin.getPlayers().getName(playerUUID)).replace("String_Node_Str",islandLoc.getBlockX() + "String_Node_Str" + islandLoc.getBlockZ()));
}
}
plugin.deletePlayerIsland(playerUUID,false);
plugin.getPlayers().setJoinTeam(playerUUID,teamLeader,plugin.getPlayers().getIslandLocation(teamLeader));
if (plugin.getPlayers().getHomeLocation(teamLeader) != null) {
plugin.getPlayers().setHomeLocation(playerUUID,plugin.getPlayers().getHomeLocation(teamLeader));
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminTeamSettingHome);
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,plugin.getPlayers().getIslandLocation(teamLeader));
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminTeamSettingHome);
}
if (!plugin.getPlayers().getMembers(teamLeader).contains(playerUUID)) {
plugin.getPlayers().addTeamMember(teamLeader,playerUUID);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminTeamAddingPlayer);
}
 else {
sender.sendMessage(ChatColor.GOLD + plugin.myLocale().adminTeamAlreadyOnTeam);
}
if (targetPlayer != null) {
plugin.getGrid().homeTeleport(targetPlayer);
}
plugin.getGrid().saveGrid();
return true;
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return false;
}
default :
return false;
}
}

Fixed version (ground truth):
@Override public boolean onCommand(final CommandSender sender,final Command command,final String label,final String[] split){
  Player player;
  if (sender instanceof Player) {
    player=(Player)sender;
    if (split.length > 0) {
      if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")|| split[0].equalsIgnoreCase("String_Node_Str")) {
        if (!checkAdminPerms(player,split)) {
          player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
          return true;
        }
      }
 else {
        if (!checkModPerms(player,split)) {
          player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
          return true;
        }
      }
    }
  }
  if (split.length > 1 && split[0].equalsIgnoreCase("String_Node_Str")) {
    final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
    if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
      sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
      return true;
    }
 else {
      if (split.length == 2) {
        sender.sendMessage(plugin.getGrid().getIslandName(playerUUID));
      }
 else {
        String name=split[2];
        for (int i=3; i < split.length; i++) {
          name=name + "String_Node_Str" + split[i];
        }
        if (name.length() < Settings.minNameLength) {
          sender.sendMessage(ChatColor.RED + (plugin.myLocale().errorTooShort).replace("String_Node_Str",String.valueOf(Settings.minNameLength)));
          return true;
        }
        if (name.length() > Settings.maxNameLength) {
          sender.sendMessage(ChatColor.RED + (plugin.myLocale().errorTooLong).replace("String_Node_Str",String.valueOf(Settings.maxNameLength)));
          return true;
        }
        plugin.getGrid().setIslandName(playerUUID,ChatColor.translateAlternateColorCodes('&',name));
        sender.sendMessage(ChatColor.GREEN + plugin.myLocale().generalSuccess);
      }
      return true;
    }
  }
switch (split.length) {
case 0:
    help(sender,label);
  return true;
case 1:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(ChatColor.YELLOW + label + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str"+ plugin.myLocale().adminHelpsetDeaths);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(ChatColor.RED + plugin.myLocale().adminHelpSettingsReset);
  return true;
}
 else if (Settings.teamChat && split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
    return true;
  }
  player=(Player)sender;
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") || player.isOp()) {
    if (plugin.getChatListener().toggleSpy(player.getUniqueId())) {
      sender.sendMessage(ChatColor.GREEN + plugin.myLocale().teamChatStatusOn);
    }
 else {
      sender.sendMessage(ChatColor.GREEN + plugin.myLocale().teamChatStatusOff);
    }
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
    return true;
  }
  player=(Player)sender;
  Island island=plugin.getGrid().getIslandAt(player.getLocation());
  if (island == null) {
    player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNotOnIsland);
    return true;
  }
 else {
    Player owner=plugin.getServer().getPlayer(island.getOwner());
    if (island.isLocked()) {
      sender.sendMessage(ChatColor.RED + plugin.myLocale().lockUnlocking);
      island.setLocked(false);
      if (owner != null) {
        owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminUnlockedIsland);
      }
 else {
        plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminUnlockedIsland);
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + plugin.myLocale().lockLocking);
      island.setLocked(true);
      if (owner != null) {
        owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminLockedIsland);
      }
 else {
        plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminLockedIsland);
      }
    }
    return true;
  }
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(plugin.myLocale().adminTopBreedersFinding);
  sender.sendMessage(plugin.myLocale().adminTopBreedersChecking.replace("String_Node_Str",String.valueOf(plugin.getGrid().getOwnershipMap().size())));
  final List<Entity> allEntities=ASkyBlock.getIslandWorld().getEntities();
  final World islandWorld=ASkyBlock.getIslandWorld();
  final World netherWorld=ASkyBlock.getNetherWorld();
  plugin.getServer().getScheduler().runTaskAsynchronously(plugin,new Runnable(){
    @Override public void run(){
      Map<UUID,Multiset<EntityType>> result=new HashMap<UUID,Multiset<EntityType>>();
      for (      Entity entity : allEntities) {
        if (entity.getLocation().getWorld().equals(islandWorld) || entity.getLocation().getWorld().equals(netherWorld)) {
          if (entity instanceof Creature && !(entity instanceof Player)) {
            Island island=plugin.getGrid().getIslandAt(entity.getLocation());
            if (island != null && !island.isSpawn()) {
              UUID owner=island.getOwner();
              Multiset<EntityType> count=result.get(owner);
              if (count == null) {
                count=HashMultiset.create();
              }
              count.add(entity.getType());
              result.put(owner,count);
            }
          }
        }
      }
      TreeMap<Integer,List<UUID>> topEntityIslands=new TreeMap<Integer,List<UUID>>();
      for (      Entry<UUID,Multiset<EntityType>> entry : result.entrySet()) {
        int numOfEntities=entry.getValue().size();
        List<UUID> players=topEntityIslands.get(numOfEntities);
        if (players == null) {
          players=new ArrayList<UUID>();
        }
        players.add(entry.getKey());
        topEntityIslands.put(numOfEntities,players);
      }
      final TreeMap<Integer,List<UUID>> topBreeders=topEntityIslands;
      final Map<UUID,Multiset<EntityType>> finalResult=result;
      plugin.getServer().getScheduler().runTask(plugin,new Runnable(){
        @Override public void run(){
          if (topBreeders.isEmpty()) {
            sender.sendMessage(plugin.myLocale().adminTopBreedersNothing);
            return;
          }
          int rank=1;
          for (          int numOfEntities : topBreeders.descendingKeySet()) {
            if (numOfEntities > 5) {
              List<UUID> owners=topBreeders.get(numOfEntities);
              for (              UUID owner : owners) {
                sender.sendMessage("String_Node_Str" + rank + "String_Node_Str"+ plugin.getPlayers().getName(owner)+ "String_Node_Str"+ numOfEntities);
                String content="String_Node_Str";
                Multiset<EntityType> entityCount=finalResult.get(owner);
                for (                EntityType entity : entityCount.elementSet()) {
                  int num=entityCount.count(entity);
                  String color=ChatColor.GREEN.toString();
                  if (num > 10 && num <= 20) {
                    color=ChatColor.YELLOW.toString();
                  }
 else                   if (num > 20 && num <= 40) {
                    color=ChatColor.GOLD.toString();
                  }
 else                   if (num > 40) {
                    color=ChatColor.RED.toString();
                  }
                  content+=Util.prettifyText(entity.toString()) + "String_Node_Str" + color+ num+ ChatColor.WHITE+ "String_Node_Str";
                }
                int lastComma=content.lastIndexOf("String_Node_Str");
                if (lastComma > 0) {
                  content=content.substring(0,lastComma);
                }
                sender.sendMessage("String_Node_Str" + content);
              }
              rank++;
              if (rank > 10) {
                break;
              }
            }
          }
          if (rank == 1) {
            sender.sendMessage(plugin.myLocale().adminTopBreedersNothing);
          }
        }
      }
);
    }
  }
);
  return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslandError);
return true;
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
player=(Player)sender;
if (!player.getLocation().getWorld().getName().equals(Settings.worldName)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorWrongWorld);
return true;
}
Location closestIsland=getClosestIsland(player.getLocation());
Island oldSpawn=plugin.getGrid().getSpawn();
Island newSpawn=plugin.getGrid().getIslandAt(closestIsland);
if (newSpawn != null && newSpawn.isSpawn()) {
plugin.getGrid().setSpawnPoint(player.getLocation());
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetSpawnset);
return true;
}
if (newSpawn != null && newSpawn.getOwner() != null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnownedBy.replace("String_Node_Str",plugin.getPlayers().getName(newSpawn.getOwner())));
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnmove);
return true;
}
if (oldSpawn != null) {
sender.sendMessage(ChatColor.GOLD + "String_Node_Str" + oldSpawn.getCenter().getBlockX()+ "String_Node_Str"+ oldSpawn.getCenter().getBlockZ()+ "String_Node_Str");
plugin.getGrid().deleteSpawn();
}
if (newSpawn == null) {
newSpawn=plugin.getGrid().addIsland(closestIsland.getBlockX(),closestIsland.getBlockZ());
}
plugin.getGrid().setSpawn(newSpawn);
plugin.getGrid().setSpawnPoint(player.getLocation());
player.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetSpawnsetting.replace("String_Node_Str",player.getLocation().getBlockX() + "String_Node_Str" + player.getLocation().getBlockZ()));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncenter.replace("String_Node_Str",newSpawn.getCenter().getBlockX() + "String_Node_Str" + newSpawn.getCenter().getBlockZ()));
player.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawnlimits.replace("String_Node_Str",newSpawn.getMinX() + "String_Node_Str" + newSpawn.getMinZ())).replace("String_Node_Str",(newSpawn.getMinX() + newSpawn.getIslandDistance() - 1) + "String_Node_Str" + (newSpawn.getMinZ() + newSpawn.getIslandDistance() - 1)));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnrange.replace("String_Node_Str",String.valueOf(newSpawn.getProtectionSize())));
player.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawncoords.replace("String_Node_Str",newSpawn.getMinProtectedX() + "String_Node_Str" + newSpawn.getMinProtectedZ())).replace("String_Node_Str",+(newSpawn.getMinProtectedX() + newSpawn.getProtectionSize() - 1) + "String_Node_Str" + (newSpawn.getMinProtectedZ() + newSpawn.getProtectionSize() - 1)));
if (newSpawn.isLocked()) {
player.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnlocked);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
Location closestIsland=getClosestIsland(((Player)sender).getLocation());
if (closestIsland == null) {
sender.sendMessage(ChatColor.RED + "String_Node_Str");
return true;
}
Island island=plugin.getGrid().getIslandAt(closestIsland);
if (island != null && island.isSpawn()) {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminInfotitle);
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncenter.replace("String_Node_Str",island.getCenter().getBlockX() + "String_Node_Str" + island.getCenter().getBlockZ()));
sender.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawnlimits.replace("String_Node_Str",island.getMinX() + "String_Node_Str" + island.getMinZ())).replace("String_Node_Str",(island.getMinX() + island.getIslandDistance() - 1) + "String_Node_Str" + (island.getMinZ() + island.getIslandDistance() - 1)));
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnrange.replace("String_Node_Str",String.valueOf(island.getProtectionSize())));
sender.sendMessage(ChatColor.YELLOW + (plugin.myLocale().adminSetSpawncoords.replace("String_Node_Str",island.getMinProtectedX() + "String_Node_Str" + island.getMinProtectedZ())).replace("String_Node_Str",+(island.getMinProtectedX() + island.getProtectionSize() - 1) + "String_Node_Str" + (island.getMinProtectedZ() + island.getProtectionSize() - 1)));
if (island.isLocked()) {
  sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnlocked);
}
return true;
}
if (island == null) {
plugin.getLogger().info("String_Node_Str" + closestIsland);
}
UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestIsland);
if (target == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminInfounowned);
return true;
}
showInfo(target,sender);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
player=(Player)sender;
if (!VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && !player.isOp()) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoPermission);
return true;
}
BlockIterator iter=new BlockIterator(player,10);
Block lastBlock=iter.next();
while (iter.hasNext()) {
lastBlock=iter.next();
if (lastBlock.getType() == Material.AIR) continue;
break;
}
if (!lastBlock.getType().equals(Material.SIGN_POST)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminResetSignNoSign);
return true;
}
Sign sign=(Sign)lastBlock.getState();
sender.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).adminResetSignFound);
UUID target=plugin.getPlayers().getPlayerFromIslandLocation(player.getLocation());
if (target == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminInfounowned);
return true;
}
if (plugin.getWarpSignsListener().addWarp(target,lastBlock.getLocation())) {
sign.setLine(0,ChatColor.GREEN + plugin.myLocale().warpswelcomeLine);
sign.update();
sender.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).adminResetSignRescued.replace("String_Node_Str",plugin.getPlayers().getName(target)));
return true;
}
sender.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminResetSignErrorExists.replace("String_Node_Str",plugin.getWarpSignsListener().getWarpOwner(lastBlock.getLocation())));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
plugin.reloadConfig();
plugin.loadPluginConfig();
plugin.getChallenges().reloadChallengeConfig();
if (Settings.useEconomy && VaultHelper.setupEconomy()) {
ControlPanel.loadShop();
}
 else {
Settings.useEconomy=false;
}
ControlPanel.loadControlPanel();
if (Settings.updateCheck) {
plugin.checkUpdates();
}
 else {
plugin.setUpdateCheck(null);
}
plugin.getIslandCmd().loadSchematics();
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().reloadconfigReloaded);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminTopTengenerating);
TopTen.topTenCreate(sender);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (purgeFlag) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgealreadyRunning);
return true;
}
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgeusage.replace("String_Node_Str",label));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!confirmReq) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().confirmerrorTimeLimitExpired);
return true;
}
 else {
confirmOK=true;
confirmReq=false;
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (asyncPending) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorCommandNotReady);
return true;
}
plugin.getPlayers().clearResets(Settings.resetLimit);
final File playerFolder=plugin.getPlayersFolder();
asyncPending=true;
plugin.getServer().getScheduler().runTaskAsynchronously(plugin,new Runnable(){
@Override public void run(){
  int done=0;
  FilenameFilter ymlFilter=new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      String lowercaseName=name.toLowerCase();
      if (lowercaseName.endsWith("String_Node_Str")) {
        return true;
      }
 else {
        return false;
      }
    }
  }
;
  for (  File file : playerFolder.listFiles(ymlFilter)) {
    List<String> playerFileContents=new ArrayList<String>();
    done++;
    try {
      Scanner scanner=new Scanner(file);
      while (scanner.hasNextLine()) {
        final String lineFromFile=scanner.nextLine();
        if (lineFromFile.contains("String_Node_Str")) {
          playerFileContents.add("String_Node_Str" + Settings.resetLimit);
        }
 else {
          playerFileContents.add(lineFromFile);
        }
      }
      scanner.close();
      FileWriter writer=new FileWriter(file);
      for (      String str : playerFileContents) {
        writer.write(str + "String_Node_Str");
      }
      writer.close();
      if (done % 500 == 0) {
        final int update=done;
        plugin.getServer().getScheduler().runTask(plugin,new Runnable(){
          @Override public void run(){
            sender.sendMessage(ChatColor.GREEN + plugin.myLocale().clearedResetLimit + "String_Node_Str"+ update+ "String_Node_Str");
          }
        }
);
      }
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
  }
  asyncPending=false;
  sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().clearedResetLimit + "String_Node_Str"+ done+ "String_Node_Str");
}
}
);
return true;
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return false;
}
case 2:
if (!plugin.getServer().getVersion().contains("String_Node_Str")) {
if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (playerUUID == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
if (sender instanceof Player) {
  plugin.getIslandCmd().calculateIslandLevel(sender,playerUUID,false);
}
 else {
  plugin.getIslandCmd().calculateIslandLevel(sender,playerUUID,true);
}
return true;
}
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (split[1].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().settingsResetInProgress);
plugin.getServer().getScheduler().runTaskAsynchronously(plugin,new Runnable(){
@Override public void run(){
for (Island island : plugin.getGrid().getOwnedIslands().values()) {
  island.setDefaults();
}
for (Island island : plugin.getGrid().getUnownedIslands().values()) {
  island.setDefaults();
}
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().settingsResetDone);
plugin.getGrid().saveGrid();
}
}
);
return true;
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminHelpSettingsReset);
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUseInGame);
return true;
}
Player p=(Player)sender;
if (!VaultHelper.checkPerm(p,Settings.PERMPREFIX + "String_Node_Str") && !p.isOp()) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).errorNoPermission);
return true;
}
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
BlockIterator iter=new BlockIterator(p,10);
Block lastBlock=iter.next();
while (iter.hasNext()) {
lastBlock=iter.next();
if (lastBlock.getType() == Material.AIR) continue;
break;
}
if (!lastBlock.getType().equals(Material.SIGN_POST)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).adminResetSignNoSign);
return true;
}
Sign sign=(Sign)lastBlock.getState();
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (!plugin.getGrid().getIslandAt(islandLoc).inIslandSpace(sign.getLocation())) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).adminSetHomeNotOnPlayersIsland);
}
 else {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminResetSignFound);
if (plugin.getWarpSignsListener().addWarp(playerUUID,lastBlock.getLocation())) {
sign.setLine(0,ChatColor.GREEN + plugin.myLocale().warpswelcomeLine);
sign.update();
p.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminResetSignRescued.replace("String_Node_Str",plugin.getPlayers().getName(playerUUID)));
return true;
}
sender.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).adminResetSignErrorExists.replace("String_Node_Str",plugin.getWarpSignsListener().getWarpOwner(lastBlock.getLocation())));
}
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!split[1].equalsIgnoreCase("String_Node_Str")) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslandError);
return true;
}
Island island=plugin.getGrid().getIslandAt(((Player)sender).getLocation());
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslandnoid);
return true;
}
UUID owner=island.getOwner();
String name="String_Node_Str";
if (owner != null) {
name=plugin.getPlayers().getName(owner);
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnownedBy.replace("String_Node_Str",name));
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminDeleteIslanduse.replace("String_Node_Str",name));
return true;
}
 else {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().deleteremoving.replace("String_Node_Str",name));
deleteIslands(island,sender);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
plugin.getGrid().setIslandName(playerUUID,null);
sender.sendMessage(plugin.myLocale().generalSuccess);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
Location safeHome=plugin.getGrid().getSafeHomeLocation(playerUUID,1);
if (safeHome == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetHomeNoneFound);
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,safeHome);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetHomeHomeSet.replace("String_Node_Str",safeHome.getBlockX() + "String_Node_Str" + safeHome.getBlockY()+ "String_Node_Str"+ safeHome.getBlockZ()));
}
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
return true;
}
player=(Player)sender;
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
}
 else {
if (!plugin.getPlayers().hasIsland(playerUUID) && !plugin.getPlayers().inTeam(playerUUID)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorNoIslandOther);
return true;
}
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (!plugin.getGrid().getIslandAt(islandLoc).inIslandSpace(player.getLocation())) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminSetHomeNotOnPlayersIsland);
}
 else {
if (!GridManager.isSafeLocation(player.getLocation())) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminSetHomeNoneFound);
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,player.getLocation());
player.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).adminSetHomeHomeSet.replace("String_Node_Str",player.getLocation().getBlockX() + "String_Node_Str" + player.getLocation().getBlockY()+ "String_Node_Str"+ player.getLocation().getBlockZ()));
}
}
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
return true;
}
player=(Player)sender;
UUID playerUUID=player.getUniqueId();
Island island=plugin.getGrid().getIslandAt(player.getLocation());
if (island == null) {
player.sendMessage(ChatColor.RED + plugin.myLocale().errorNotOnIsland);
return true;
}
 else {
int newRange=10;
int maxRange=Settings.islandDistance;
if (island.isSpawn()) {
try {
newRange=Integer.valueOf(split[1]);
}
 catch (Exception e) {
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeInvalid);
return true;
}
player.sendMessage(ChatColor.GREEN + plugin.myLocale(playerUUID).adminSetRangeSet.replace("String_Node_Str",String.valueOf(newRange)));
if (newRange > maxRange) {
player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.BOLD+ plugin.myLocale(playerUUID).adminSetRangeWarning.replace("String_Node_Str",String.valueOf(maxRange)));
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeWarning2);
}
island.setProtectionSize(newRange);
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncenter.replace("String_Node_Str",island.getCenter().getBlockX() + "String_Node_Str" + island.getCenter().getBlockZ()));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnlimits.replace("String_Node_Str",island.getMinX() + "String_Node_Str" + island.getMinZ()).replace("String_Node_Str",(island.getMinX() + island.getIslandDistance() - 1) + "String_Node_Str" + (island.getMinZ() + island.getIslandDistance() - 1)));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawnrange.replace("String_Node_Str",String.valueOf(island.getProtectionSize())));
player.sendMessage(ChatColor.YELLOW + plugin.myLocale().adminSetSpawncoords.replace("String_Node_Str",island.getMinProtectedX() + "String_Node_Str" + island.getMinProtectedZ()).replace("String_Node_Str",+(island.getMinProtectedX() + island.getProtectionSize() - 1) + "String_Node_Str" + (island.getMinProtectedZ() + island.getProtectionSize() - 1)));
if (island.isLocked()) {
player.sendMessage(ChatColor.RED + plugin.myLocale().adminSetSpawnlocked);
}
}
 else {
if (!plugin.getConfig().getBoolean("String_Node_Str")) {
maxRange-=16;
}
try {
newRange=Integer.valueOf(split[1]);
}
 catch (Exception e) {
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale(playerUUID).adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
if (newRange < 10 || newRange > maxRange) {
player.sendMessage(ChatColor.RED + plugin.myLocale(playerUUID).adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale(playerUUID).adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
island.setProtectionSize(newRange);
player.sendMessage(ChatColor.GREEN + plugin.myLocale(playerUUID).adminSetRangeSet.replace("String_Node_Str",String.valueOf(newRange)));
showInfo(island.getOwner(),sender);
}
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (split[1].equalsIgnoreCase("String_Node_Str") || split[1].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminLockerrorInGame);
return true;
}
Player p=(Player)sender;
if (!p.getLocation().getWorld().equals(ASkyBlock.getIslandWorld()) && !p.getLocation().getWorld().equals(ASkyBlock.getNetherWorld())) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).errorWrongWorld);
return true;
}
Island island=plugin.getGrid().getIslandAt(p.getLocation());
if (island == null) {
p.sendMessage(ChatColor.RED + plugin.myLocale(p.getUniqueId()).errorNoIslandOther);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
island.setPurgeProtected(true);
}
 else {
island.setPurgeProtected(false);
}
if (island.isPurgeProtected()) {
p.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminAllowPurge);
}
 else {
p.sendMessage(ChatColor.GREEN + plugin.myLocale(p.getUniqueId()).adminPreventPurge);
}
return true;
}
if (purgeFlag) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgealreadyRunning);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
countUnowned(sender);
return true;
}
purgeFlag=true;
final int time;
try {
time=Integer.parseInt(split[1]) * 24;
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgeusage.replace("String_Node_Str",label));
purgeFlag=false;
return true;
}
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgecalculating.replace("String_Node_Str",split[1]));
for (Entry<UUID,Island> entry : plugin.getGrid().getOwnershipMap().entrySet()) {
if (entry.getKey() != null && !entry.getValue().isPurgeProtected()) {
if (Bukkit.getOfflinePlayer(entry.getKey()).hasPlayedBefore()) {
long offlineTime=Bukkit.getOfflinePlayer(entry.getKey()).getLastPlayed();
offlineTime=(System.currentTimeMillis() - offlineTime) / 3600000L;
if (offlineTime > time) {
removeList.add(entry.getKey());
}
}
 else {
removeList.add(entry.getKey());
}
}
}
if (removeList.isEmpty()) {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgenoneFound);
purgeFlag=false;
return true;
}
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgethisWillRemove.replace("String_Node_Str",String.valueOf(removeList.size())).replace("String_Node_Str",String.valueOf(Settings.abandonedIslandLevel)));
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgewarning);
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgetypeConfirm.replace("String_Node_Str",label));
confirmReq=true;
confirmOK=false;
confirmTimer=0;
new BukkitRunnable(){
@Override public void run(){
if (confirmTimer++ > 10) {
confirmReq=false;
confirmOK=false;
purgeFlag=false;
removeList.clear();
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgepurgeCancelled);
this.cancel();
}
 else if (confirmOK) {
final int total=removeList.size();
new BukkitRunnable(){
@Override public void run(){
if (removeList.isEmpty() && purgeFlag) {
  purgeFlag=false;
  sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().purgefinished);
  this.cancel();
}
if (removeList.size() > 0 && purgeFlag) {
  if (plugin.getServer().getPlayer(removeList.get(0)) == null) {
    if (plugin.getPlayers().getIslandLevel(removeList.get(0)) < Settings.abandonedIslandLevel) {
      sender.sendMessage(ChatColor.YELLOW + "String_Node_Str" + (total - removeList.size() + 1)+ "String_Node_Str"+ total+ "String_Node_Str"+ plugin.myLocale().purgeremovingName.replace("String_Node_Str",plugin.getPlayers().getName(removeList.get(0))));
      plugin.deletePlayerIsland(removeList.get(0),true);
    }
  }
 else {
    sender.sendMessage(ChatColor.YELLOW + "String_Node_Str" + (total - removeList.size() + 1)+ "String_Node_Str"+ total+ "String_Node_Str"+ "String_Node_Str");
  }
  removeList.remove(0);
}
}
}
.runTaskTimer(plugin,0L,20L);
confirmReq=false;
confirmOK=false;
this.cancel();
}
}
}
.runTaskTimer(plugin,0L,40L);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
Island island=plugin.getGrid().getIsland(playerUUID);
if (island != null) {
Player owner=plugin.getServer().getPlayer(island.getOwner());
if (island.isLocked()) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().lockUnlocking);
island.setLocked(false);
if (owner != null) {
owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminUnlockedIsland);
}
 else {
plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminUnlockedIsland);
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().lockLocking);
island.setLocked(true);
if (owner != null) {
owner.sendMessage(plugin.myLocale(owner.getUniqueId()).adminLockadminLockedIsland);
}
 else {
plugin.getMessages().setMessage(island.getOwner(),plugin.myLocale(island.getOwner()).adminLockadminLockedIsland);
}
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
}
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
sender.sendMessage(ChatColor.GREEN + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ plugin.getPlayers().getDeaths(playerUUID)+ "String_Node_Str"+ plugin.myLocale().deaths);
sender.sendMessage(ChatColor.YELLOW + label + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str"+ plugin.myLocale().adminHelpsetDeaths);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
plugin.getPlayers().setResetsLeft(playerUUID,Settings.resetLimit);
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().clearedResetLimit + "String_Node_Str"+ Settings.resetLimit+ "String_Node_Str");
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return true;
}
player=(Player)sender;
final UUID targetUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(targetUUID)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
 else {
if (plugin.getPlayers().hasIsland(targetUUID) || plugin.getPlayers().inTeam(targetUUID)) {
Location warpSpot=plugin.getPlayers().getIslandLocation(targetUUID).toVector().toLocation(ASkyBlock.getIslandWorld());
String failureMessage=ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminTpManualWarp.replace("String_Node_Str",warpSpot.getBlockX() + "String_Node_Str" + warpSpot.getBlockY()+ "String_Node_Str"+ warpSpot.getBlockZ());
Location home=plugin.getPlayers().getHomeLocation(targetUUID);
plugin.getGrid();
if (home != null && home.getWorld().equals(ASkyBlock.getIslandWorld()) && GridManager.isSafeLocation(home)) {
player.teleport(home);
return true;
}
new SafeSpotTeleport(plugin,player,warpSpot,failureMessage);
return true;
}
sender.sendMessage(plugin.myLocale().errorNoIslandOther);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (!Settings.createNether || !Settings.newNether || ASkyBlock.getNetherWorld() == null) {
return false;
}
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return true;
}
player=(Player)sender;
final UUID targetUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(targetUUID)) {
player.sendMessage(ChatColor.RED + plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
return true;
}
 else {
if (plugin.getPlayers().hasIsland(targetUUID) || plugin.getPlayers().inTeam(targetUUID)) {
Location warpSpot=plugin.getPlayers().getIslandLocation(targetUUID).toVector().toLocation(ASkyBlock.getNetherWorld());
String failureMessage=ChatColor.RED + plugin.myLocale(player.getUniqueId()).adminTpManualWarp.replace("String_Node_Str",warpSpot.getBlockX() + "String_Node_Str" + warpSpot.getBlockY()+ "String_Node_Str"+ warpSpot.getBlockZ());
Location home=plugin.getPlayers().getHomeLocation(targetUUID);
plugin.getGrid();
if (home != null && home.getWorld().equals(ASkyBlock.getNetherWorld()) && GridManager.isSafeLocation(home)) {
player.teleport(home);
return true;
}
new SafeSpotTeleport(plugin,player,warpSpot,failureMessage);
return true;
}
sender.sendMessage(plugin.myLocale().errorNoIslandOther);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().deleteremoving.replace("String_Node_Str",split[1]));
Player target=plugin.getServer().getPlayer(playerUUID);
if (target != null) {
CoopPlay.getInstance().clearMyInvitedCoops(target);
CoopPlay.getInstance().clearMyCoops(target);
plugin.resetPlayer(target);
}
plugin.deletePlayerIsland(playerUUID,true);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (sender instanceof Player) {
player=(Player)sender;
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
Location islandLoc=plugin.getGrid().getClosestIsland(player.getLocation());
Island island=plugin.getGrid().getIslandAt(islandLoc);
if (island == null) {
plugin.getIslandCmd().reserveLocation(playerUUID,islandLoc);
sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + islandLoc.getBlockX()+ "String_Node_Str"+ islandLoc.getBlockZ()+ "String_Node_Str"+ plugin.myLocale().generalSuccess);
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminReserveIslandExists);
}
return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (sender instanceof Player) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
if (adminSetPlayerIsland(sender,((Player)sender).getLocation(),playerUUID)) {
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().registersettingIsland.replace("String_Node_Str",split[1]));
plugin.getGrid().saveGrid();
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().registererrorBedrockNotFound);
}
return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
if (plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminUnregisterOnTeam);
return true;
}
Location island=plugin.getPlayers().getIslandLocation(playerUUID);
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminUnregisterKeepBlocks.replace("String_Node_Str",+plugin.getPlayers().getIslandLocation(playerUUID).getBlockX() + "String_Node_Str" + plugin.getPlayers().getIslandLocation(playerUUID).getBlockZ()));
plugin.deletePlayerIsland(playerUUID,false);
plugin.getGrid().saveGrid();
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
showInfo(playerUUID,sender);
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
plugin.getPlayers().resetAllChallenges(playerUUID,true);
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().resetChallengessuccess.replace("String_Node_Str",split[1]));
return true;
}
 else {
return false;
}
case 3:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (purgeFlag) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().purgealreadyRunning);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str") && split[2].equalsIgnoreCase("String_Node_Str")) {
if (!purgeUnownedConfirm) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().confirmerrorTimeLimitExpired);
return true;
}
 else {
purgeUnownedConfirm=false;
purgeUnownedIslands(sender);
return true;
}
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
playerUUID=plugin.getPlayers().getTeamLeader(playerUUID);
}
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIslandOther);
return true;
}
 else {
int newRange=0;
int maxRange=Settings.islandDistance;
if (!plugin.getConfig().getBoolean("String_Node_Str")) {
maxRange-=16;
}
try {
newRange=Integer.valueOf(split[2]);
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale().adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
if (newRange < 10 || newRange > maxRange) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminSetRangeInvalid + "String_Node_Str"+ plugin.myLocale().adminSetRangeTip.replace("String_Node_Str",String.valueOf(maxRange)));
return true;
}
island.setProtectionSize(newRange);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminSetRangeSet.replace("String_Node_Str",String.valueOf(newRange)));
showInfo(playerUUID,sender);
plugin.getGrid().saveGrid();
return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
try {
int newDeaths=Integer.valueOf(split[2]);
int oldDeaths=plugin.getPlayers().getDeaths(playerUUID);
plugin.getPlayers().setDeaths(playerUUID,newDeaths);
sender.sendMessage(ChatColor.GREEN + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ oldDeaths+ "String_Node_Str"+ newDeaths+ "String_Node_Str"+ plugin.myLocale().deaths);
}
 catch (Exception e) {
sender.sendMessage(ChatColor.GREEN + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ plugin.getPlayers().getDeaths(playerUUID)+ "String_Node_Str"+ plugin.myLocale().deaths);
sender.sendMessage(ChatColor.YELLOW + label + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str"+ plugin.myLocale().adminHelpsetDeaths);
return true;
}
return true;
}
}
if (split[0].equalsIgnoreCase("String_Node_Str")) {
UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
playerUUID=plugin.getPlayers().getTeamLeader(playerUUID);
}
Island island=plugin.getGrid().getIsland(playerUUID);
if (island == null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoIsland);
return true;
}
Biome biome=null;
String biomeName=split[2].toUpperCase();
try {
biome=Biome.valueOf(biomeName);
biomeName=biome.name();
if (!plugin.getConfig().contains("String_Node_Str" + biomeName)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().biomeUnknown);
for (Biome b : Biome.values()) {
if (plugin.getConfig().contains("String_Node_Str" + b.name())) {
sender.sendMessage(b.name());
}
}
return true;
}
biomeName=plugin.getConfig().getString("String_Node_Str" + biomeName + "String_Node_Str",Util.prettifyText(biomeName));
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().biomeUnknown);
for (Biome b : Biome.values()) {
if (plugin.getConfig().contains("String_Node_Str" + b.name())) {
sender.sendMessage(b.name());
}
}
return true;
}
plugin.getBiomes().setIslandBiome(island,biome);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().biomeSet.replace("String_Node_Str",biomeName));
Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
if (targetPlayer != null) {
targetPlayer.sendMessage("String_Node_Str" + ChatColor.GREEN + plugin.myLocale(playerUUID).biomeSet.replace("String_Node_Str",biomeName));
}
 else {
plugin.getMessages().setMessage(playerUUID,"String_Node_Str" + ChatColor.GREEN + plugin.myLocale(playerUUID).biomeSet.replace("String_Node_Str",biomeName));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorNoTeam);
return true;
}
UUID teamLeader=plugin.getPlayers().getTeamLeader(playerUUID);
if (teamLeader == null) {
plugin.getPlayers().setLeaveTeam(playerUUID);
plugin.getPlayers().setHomeLocation(playerUUID,null);
plugin.getPlayers().setIslandLocation(playerUUID,null);
plugin.getWarpSignsListener().removeWarp(playerUUID);
sender.sendMessage(ChatColor.RED + plugin.myLocale().kicknameRemoved.replace("String_Node_Str",split[2]));
return true;
}
if (!teamLeader.equals(playerUUID)) {
plugin.getPlayers().setLeaveTeam(playerUUID);
plugin.getPlayers().setHomeLocation(playerUUID,null);
plugin.getPlayers().setIslandLocation(playerUUID,null);
plugin.getPlayers().removeMember(teamLeader,playerUUID);
if (plugin.getPlayers().getMembers(teamLeader).size() < 2) {
plugin.getPlayers().setLeaveTeam(teamLeader);
}
plugin.getWarpSignsListener().removeWarp(playerUUID);
sender.sendMessage(ChatColor.RED + plugin.myLocale().kicknameRemoved.replace("String_Node_Str",split[2]));
return true;
}
 else {
sender.sendMessage(ChatColor.RED + (plugin.myLocale().adminTeamKickLeader.replace("String_Node_Str",label)).replace("String_Node_Str",split[2]));
return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return false;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().checkChallenge(playerUUID,split[2].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[2].toLowerCase())) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().completeChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().get(playerUUID).completeChallenge(split[2].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().completeChallengechallangeCompleted.replace("String_Node_Str",split[2].toLowerCase()).replace("String_Node_Str",split[1]));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (!plugin.getPlayers().checkChallenge(playerUUID,split[2].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[2].toLowerCase())) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().resetChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().resetChallenge(playerUUID,split[2].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + plugin.myLocale().resetChallengechallengeReset.replace("String_Node_Str",split[2].toLowerCase()).replace("String_Node_Str",split[1]));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str") && split[1].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
 else {
showInfoChallenges(playerUUID,sender);
return true;
}
}
return false;
case 4:
if (split[0].equalsIgnoreCase("String_Node_Str") && split[1].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2],true);
final Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
final UUID teamLeader=plugin.getPlayers().getUUID(split[3],true);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID) || !plugin.getPlayers().isAKnownPlayer(teamLeader)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownPlayer);
return true;
}
if (playerUUID.equals(teamLeader)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminTeamAddLeaderToOwn);
return true;
}
if (!plugin.getPlayers().hasIsland(teamLeader)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminTeamAddLeaderNoIsland);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().inviteerrorThatPlayerIsAlreadyInATeam);
return true;
}
if (!plugin.getPlayers().getMembers(teamLeader).contains(teamLeader)) {
plugin.getPlayers().setJoinTeam(teamLeader,teamLeader,plugin.getPlayers().getIslandLocation(teamLeader));
plugin.getPlayers().addTeamMember(teamLeader,teamLeader);
sender.sendMessage(ChatColor.GOLD + plugin.myLocale().adminTeamAddedLeader);
}
if (targetPlayer != null) {
targetPlayer.performCommand(Settings.ISLANDCOMMAND + "String_Node_Str");
}
if (plugin.getPlayers().hasIsland(playerUUID)) {
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (islandLoc != null) {
sender.sendMessage(ChatColor.RED + plugin.myLocale().adminTeamNowUnowned.replace("String_Node_Str",plugin.getPlayers().getName(playerUUID)).replace("String_Node_Str",islandLoc.getBlockX() + "String_Node_Str" + islandLoc.getBlockZ()));
}
}
plugin.deletePlayerIsland(playerUUID,false);
plugin.getPlayers().setJoinTeam(playerUUID,teamLeader,plugin.getPlayers().getIslandLocation(teamLeader));
if (plugin.getPlayers().getHomeLocation(teamLeader) != null) {
plugin.getPlayers().setHomeLocation(playerUUID,plugin.getPlayers().getHomeLocation(teamLeader));
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminTeamSettingHome);
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,plugin.getPlayers().getIslandLocation(teamLeader));
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminTeamSettingHome);
}
if (!plugin.getPlayers().getMembers(teamLeader).contains(playerUUID)) {
plugin.getPlayers().addTeamMember(teamLeader,playerUUID);
sender.sendMessage(ChatColor.GREEN + plugin.myLocale().adminTeamAddingPlayer);
}
 else {
sender.sendMessage(ChatColor.GOLD + plugin.myLocale().adminTeamAlreadyOnTeam);
}
if (targetPlayer != null) {
plugin.getGrid().homeTeleport(targetPlayer);
}
plugin.getGrid().saveGrid();
return true;
}
 else {
sender.sendMessage(ChatColor.RED + plugin.myLocale().errorUnknownCommand);
return false;
}
default :
return false;
}
}