Program: 34117
Project: 34117
Buggy source:
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")) {
        if (!checkAdminPerms(player,split)) {
          player.sendMessage(ChatColor.RED + Locale.errorNoPermission);
          return true;
        }
      }
 else {
        if (!checkModPerms(player,split)) {
          player.sendMessage(ChatColor.RED + Locale.errorNoPermission);
          return true;
        }
      }
    }
  }
switch (split.length) {
case 0:
    help(sender);
  return true;
case 1:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  Player p=(Player)sender;
  Location closestBedRock=null;
  double distance=0;
  for (int x=-Settings.islandDistance; x < Settings.islandDistance; x++) {
    for (int z=-Settings.islandDistance; z < Settings.islandDistance; z++) {
      Location blockLoc=new Location(p.getWorld(),x + p.getLocation().getBlockX(),Settings.island_level,z + p.getLocation().getBlockZ());
      if (blockLoc.getBlock().getType().equals(Material.BEDROCK)) {
        if (closestBedRock == null) {
          closestBedRock=blockLoc.clone();
          distance=closestBedRock.distanceSquared(p.getLocation());
        }
 else {
          double newDist=blockLoc.distanceSquared(p.getLocation());
          if (distance > newDist) {
            closestBedRock=blockLoc.clone();
            distance=newDist;
          }
        }
      }
    }
  }
  if (closestBedRock == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestBedRock);
  if (target == null) {
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  }
 else {
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + plugin.getPlayers().getName(target));
    if (plugin.getPlayers().inTeam(target)) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return true;
    }
  }
  plugin.getSpawn().setSpawnLoc(closestBedRock,((Player)sender).getLocation());
  closestBedRock.getWorld().setSpawnLocation(((Player)sender).getLocation().getBlockX(),closestBedRock.getBlockY(),closestBedRock.getBlockZ());
  if (target != null) {
    plugin.getPlayers().setIslandLevel(target,0);
    plugin.getPlayers().setHasIsland(target,false);
    plugin.getPlayers().setHomeLocation(target,null);
    plugin.getPlayers().setIslandLocation(target,null);
    plugin.getPlayers().save(target);
  }
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  plugin.getSpawn().save();
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  Location closestIsland=getClosestIsland(((Player)sender).getLocation());
  if (closestIsland == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestIsland);
  if (target == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  showInfo(target,sender);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  Player p=(Player)sender;
  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 + "String_Node_Str");
    return true;
  }
  Sign sign=(Sign)lastBlock.getState();
  try {
    if (!sign.getLine(0).equalsIgnoreCase(ChatColor.GREEN + Locale.warpswelcomeLine) && !sign.getLine(0).equalsIgnoreCase(ChatColor.RED + Locale.warpswelcomeLine)) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return true;
    }
  }
 catch (  Exception e) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  Location closestBedRock=getClosestIsland(((Player)sender).getLocation());
  if (closestBedRock == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestBedRock);
  if (target == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  if (plugin.addWarp(target,lastBlock.getLocation())) {
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + plugin.getPlayers().getName(target));
    return true;
  }
  sender.sendMessage(ChatColor.RED + "String_Node_Str" + plugin.getWarpOwner(lastBlock.getLocation()));
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  plugin.reloadConfig();
  plugin.loadPluginConfig();
  plugin.reloadChallengeConfig();
  ControlPanel.loadShop();
  ControlPanel.loadControlPanel();
  plugin.getSpawn().reload();
  sender.sendMessage(ChatColor.YELLOW + Locale.reloadconfigReloaded);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(ChatColor.YELLOW + Locale.adminTopTengenerating);
  plugin.updateTopTen();
  sender.sendMessage(ChatColor.YELLOW + Locale.adminTopTenfinished);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (purgeFlag) {
    sender.sendMessage(ChatColor.RED + Locale.purgealreadyRunning);
    return true;
  }
  sender.sendMessage(ChatColor.YELLOW + Locale.purgeusage);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!confirmReq) {
    sender.sendMessage(ChatColor.RED + Locale.confirmerrorTimeLimitExpired);
    return true;
  }
 else {
    confirmOK=true;
    confirmReq=false;
  }
  return true;
}
 else {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
  return false;
}
case 2:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (purgeFlag) {
  sender.sendMessage(ChatColor.RED + Locale.purgealreadyRunning);
  return true;
}
purgeFlag=true;
final int time=Integer.parseInt(split[1]) * 24;
sender.sendMessage(ChatColor.YELLOW + Locale.purgecalculating.replace("String_Node_Str",split[1]));
plugin.getServer().getScheduler().runTask(plugin,new Runnable(){
  public void run(){
    final File directoryPlayers=new File(plugin.getDataFolder() + File.separator + "String_Node_Str");
    long offlineTime=0L;
    for (    final File playerFile : directoryPlayers.listFiles()) {
      if (playerFile.getName().endsWith("String_Node_Str")) {
        final UUID playerUUID=UUID.fromString(playerFile.getName().substring(0,playerFile.getName().length() - 4));
        if (Bukkit.getOfflinePlayer(playerUUID) != null && Bukkit.getPlayer(playerUUID) == null) {
          final OfflinePlayer oplayer=Bukkit.getOfflinePlayer(playerUUID);
          offlineTime=oplayer.getLastPlayed();
          offlineTime=(System.currentTimeMillis() - offlineTime) / 3600000L;
          if (offlineTime > time) {
            if (plugin.getPlayers().hasIsland(playerUUID)) {
              if (!plugin.getPlayers().inTeam(playerUUID)) {
                if (plugin.getPlayers().getIslandLevel(playerUUID) < Settings.abandonedIslandLevel) {
                  removeList.add(playerUUID);
                }
              }
            }
          }
        }
      }
    }
    if (removeList.isEmpty()) {
      sender.sendMessage(ChatColor.YELLOW + Locale.purgenoneFound);
      purgeFlag=false;
      return;
    }
    sender.sendMessage(ChatColor.YELLOW + Locale.purgethisWillRemove.replace("String_Node_Str",String.valueOf(removeList.size())));
    sender.sendMessage(ChatColor.RED + Locale.purgewarning);
    sender.sendMessage(ChatColor.RED + Locale.purgetypeConfirm);
    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 + Locale.purgepurgeCancelled);
          this.cancel();
        }
 else         if (confirmOK) {
          new BukkitRunnable(){
            @Override public void run(){
              if (removeList.isEmpty() && purgeFlag) {
                purgeFlag=false;
                sender.sendMessage(ChatColor.YELLOW + Locale.purgefinished);
                this.cancel();
              }
              if (removeList.size() > 0 && purgeFlag) {
                plugin.deletePlayerIsland(removeList.get(0));
                sender.sendMessage(ChatColor.YELLOW + Locale.purgeremovingName.replace("String_Node_Str",plugin.getPlayers().getName(removeList.get(0))));
                removeList.remove(0);
              }
            }
          }
.runTaskTimer(plugin,0L,100L);
          confirmReq=false;
          confirmOK=false;
          this.cancel();
        }
      }
    }
.runTaskTimer(plugin,0L,20L);
  }
}
);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
 else {
  plugin.getPlayers().setResetsLeft(playerUUID,Settings.resetLimit);
  sender.sendMessage(ChatColor.YELLOW + Locale.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 + Locale.errorUnknownCommand);
  return true;
}
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
 else {
  if (plugin.getPlayers().getIslandLocation(playerUUID) != null) {
    ((Player)sender).teleport(plugin.getSafeHomeLocation(playerUUID));
    return true;
  }
  sender.sendMessage(Locale.errorNoIslandOther);
  return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
 else {
  if (plugin.getPlayers().getIslandLocation(playerUUID) != null) {
    sender.sendMessage(ChatColor.YELLOW + Locale.deleteremoving.replace("String_Node_Str",split[1]));
    plugin.deletePlayerIsland(playerUUID);
    Player target=plugin.getServer().getPlayer(playerUUID);
    if (target != null) {
      plugin.resetPlayer(target);
    }
    return true;
  }
  sender.sendMessage(Locale.errorNoIslandOther);
  return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (sender instanceof Player) {
  final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
  if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
    sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
    return true;
  }
 else {
    if (adminSetPlayerIsland(sender,((Player)sender).getLocation(),playerUUID)) {
      sender.sendMessage(ChatColor.GREEN + Locale.registersettingIsland.replace("String_Node_Str",split[1]));
    }
 else {
      sender.sendMessage(ChatColor.RED + Locale.registererrorBedrockNotFound);
    }
    return true;
  }
}
 else {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.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]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
plugin.getPlayers().resetAllChallenges(playerUUID);
sender.sendMessage(ChatColor.YELLOW + Locale.resetChallengessuccess.replace("String_Node_Str",split[1]));
return true;
}
 else {
return false;
}
case 3:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
if (!plugin.getPlayers().getTeamLeader(playerUUID).equals(playerUUID)) {
  sender.sendMessage(ChatColor.RED + "String_Node_Str" + plugin.getPlayers().getName(plugin.getPlayers().getTeamLeader(playerUUID)));
}
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 + Locale.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",ASkyBlock.prettifyText(biomeName));
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + Locale.biomeUnknown);
for (Biome b : Biome.values()) {
  if (plugin.getConfig().contains("String_Node_Str" + b.name())) {
    sender.sendMessage(b.name());
  }
}
return true;
}
if (plugin.getPlayers().inTeam(playerUUID) && plugin.getPlayers().getTeamIslandLocation(playerUUID) != null) {
plugin.setIslandBiome(plugin.getPlayers().getTeamIslandLocation(playerUUID),biome);
}
 else {
plugin.setIslandBiome(plugin.getPlayers().getIslandLocation(playerUUID),biome);
}
sender.sendMessage(ChatColor.GREEN + Locale.biomeSet.replace("String_Node_Str",biomeName));
Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
if (targetPlayer != null) {
targetPlayer.sendMessage("String_Node_Str" + ChatColor.GREEN + Locale.biomeSet.replace("String_Node_Str",biomeName));
}
 else {
plugin.setMessage(playerUUID,"String_Node_Str" + ChatColor.GREEN + Locale.biomeSet.replace("String_Node_Str",biomeName));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorNoTeam);
  return true;
}
UUID teamLeader=plugin.getPlayers().getTeamLeader(playerUUID);
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.removeWarp(playerUUID);
  sender.sendMessage(ChatColor.RED + Locale.kicknameRemoved.replace("String_Node_Str",split[2]));
  return true;
}
 else {
  sender.sendMessage(ChatColor.RED + "String_Node_Str" + split[2]+ "String_Node_Str");
  return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
return false;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().checkChallenge(playerUUID,split[1].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[1].toLowerCase())) {
sender.sendMessage(ChatColor.RED + Locale.completeChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().get(playerUUID).completeChallenge(split[1].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + Locale.completeChallengechallangeCompleted.replace("String_Node_Str",split[1].toLowerCase()).replace("String_Node_Str",split[2]));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (!plugin.getPlayers().checkChallenge(playerUUID,split[1].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[1].toLowerCase())) {
sender.sendMessage(ChatColor.RED + Locale.resetChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().resetChallenge(playerUUID,split[1].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + Locale.resetChallengechallengeReset.replace("String_Node_Str",split[1].toLowerCase()).replace("String_Node_Str",split[2]));
return true;
}
 else {
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]);
final Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
final UUID teamLeader=plugin.getPlayers().getUUID(split[3]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID) || !plugin.getPlayers().isAKnownPlayer(teamLeader)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (playerUUID.equals(teamLeader)) {
sender.sendMessage(ChatColor.RED + "String_Node_Str");
return true;
}
if (!plugin.getPlayers().hasIsland(teamLeader)) {
sender.sendMessage(ChatColor.RED + "String_Node_Str");
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.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 + "String_Node_Str");
}
if (targetPlayer != null) {
targetPlayer.performCommand("String_Node_Str");
}
if (plugin.getPlayers().hasIsland(playerUUID)) {
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (islandLoc != null) {
sender.sendMessage(ChatColor.RED + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ islandLoc.getBlockX()+ "String_Node_Str"+ islandLoc.getBlockZ()+ "String_Node_Str");
}
}
plugin.getPlayers().setIslandLocation(playerUUID,null);
plugin.getPlayers().setHasIsland(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 + "String_Node_Str");
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,plugin.getPlayers().getIslandLocation(teamLeader));
sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
}
if (!plugin.getPlayers().getMembers(teamLeader).contains(playerUUID)) {
plugin.getPlayers().addTeamMember(teamLeader,playerUUID);
sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
}
 else {
sender.sendMessage(ChatColor.GOLD + "String_Node_Str");
}
if (targetPlayer != null) {
plugin.homeTeleport(targetPlayer);
}
return true;
}
 else {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
return false;
}
default :
return false;
}
}

Fixed version (ground truth):
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")) {
        if (!checkAdminPerms(player,split)) {
          player.sendMessage(ChatColor.RED + Locale.errorNoPermission);
          return true;
        }
      }
 else {
        if (!checkModPerms(player,split)) {
          player.sendMessage(ChatColor.RED + Locale.errorNoPermission);
          return true;
        }
      }
    }
  }
switch (split.length) {
case 0:
    help(sender);
  return true;
case 1:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  Player p=(Player)sender;
  Location closestBedRock=null;
  double distance=0;
  for (int x=-Settings.islandDistance; x < Settings.islandDistance; x++) {
    for (int z=-Settings.islandDistance; z < Settings.islandDistance; z++) {
      Location blockLoc=new Location(p.getWorld(),x + p.getLocation().getBlockX(),Settings.island_level,z + p.getLocation().getBlockZ());
      if (blockLoc.getBlock().getType().equals(Material.BEDROCK)) {
        if (closestBedRock == null) {
          closestBedRock=blockLoc.clone();
          distance=closestBedRock.distanceSquared(p.getLocation());
        }
 else {
          double newDist=blockLoc.distanceSquared(p.getLocation());
          if (distance > newDist) {
            closestBedRock=blockLoc.clone();
            distance=newDist;
          }
        }
      }
    }
  }
  if (closestBedRock == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestBedRock);
  if (target == null) {
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  }
 else {
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + plugin.getPlayers().getName(target));
    if (plugin.getPlayers().inTeam(target)) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return true;
    }
  }
  plugin.getSpawn().setSpawnLoc(closestBedRock,((Player)sender).getLocation());
  closestBedRock.getWorld().setSpawnLocation(((Player)sender).getLocation().getBlockX(),closestBedRock.getBlockY(),closestBedRock.getBlockZ());
  if (target != null) {
    plugin.getPlayers().setIslandLevel(target,0);
    plugin.getPlayers().setHasIsland(target,false);
    plugin.getPlayers().setHomeLocation(target,null);
    plugin.getPlayers().setIslandLocation(target,null);
    plugin.getPlayers().save(target);
  }
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  plugin.getSpawn().save();
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  Location closestIsland=getClosestIsland(((Player)sender).getLocation());
  if (closestIsland == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestIsland);
  if (target == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  showInfo(target,sender);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!(sender instanceof Player)) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  Player p=(Player)sender;
  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 + "String_Node_Str");
    return true;
  }
  Sign sign=(Sign)lastBlock.getState();
  try {
    if (!sign.getLine(0).equalsIgnoreCase(ChatColor.GREEN + Locale.warpswelcomeLine) && !sign.getLine(0).equalsIgnoreCase(ChatColor.RED + Locale.warpswelcomeLine)) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return true;
    }
  }
 catch (  Exception e) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
  Location closestBedRock=getClosestIsland(((Player)sender).getLocation());
  if (closestBedRock == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  UUID target=plugin.getPlayers().getPlayerFromIslandLocation(closestBedRock);
  if (target == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  if (plugin.addWarp(target,lastBlock.getLocation())) {
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + plugin.getPlayers().getName(target));
    return true;
  }
  sender.sendMessage(ChatColor.RED + "String_Node_Str" + plugin.getWarpOwner(lastBlock.getLocation()));
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  plugin.reloadConfig();
  plugin.loadPluginConfig();
  plugin.reloadChallengeConfig();
  ControlPanel.loadShop();
  ControlPanel.loadControlPanel();
  plugin.getSpawn().reload();
  sender.sendMessage(ChatColor.YELLOW + Locale.reloadconfigReloaded);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  sender.sendMessage(ChatColor.YELLOW + Locale.adminTopTengenerating);
  plugin.updateTopTen();
  sender.sendMessage(ChatColor.YELLOW + Locale.adminTopTenfinished);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (purgeFlag) {
    sender.sendMessage(ChatColor.RED + Locale.purgealreadyRunning);
    return true;
  }
  sender.sendMessage(ChatColor.YELLOW + Locale.purgeusage);
  return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
  if (!confirmReq) {
    sender.sendMessage(ChatColor.RED + Locale.confirmerrorTimeLimitExpired);
    return true;
  }
 else {
    confirmOK=true;
    confirmReq=false;
  }
  return true;
}
 else {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
  return false;
}
case 2:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (purgeFlag) {
  sender.sendMessage(ChatColor.RED + Locale.purgealreadyRunning);
  return true;
}
purgeFlag=true;
final int time=Integer.parseInt(split[1]) * 24;
sender.sendMessage(ChatColor.YELLOW + Locale.purgecalculating.replace("String_Node_Str",split[1]));
plugin.getServer().getScheduler().runTask(plugin,new Runnable(){
  public void run(){
    final File directoryPlayers=new File(plugin.getDataFolder() + File.separator + "String_Node_Str");
    long offlineTime=0L;
    for (    final File playerFile : directoryPlayers.listFiles()) {
      if (playerFile.getName().endsWith("String_Node_Str")) {
        final UUID playerUUID=UUID.fromString(playerFile.getName().substring(0,playerFile.getName().length() - 4));
        if (Bukkit.getOfflinePlayer(playerUUID) != null && Bukkit.getPlayer(playerUUID) == null) {
          final OfflinePlayer oplayer=Bukkit.getOfflinePlayer(playerUUID);
          offlineTime=oplayer.getLastPlayed();
          offlineTime=(System.currentTimeMillis() - offlineTime) / 3600000L;
          if (offlineTime > time) {
            if (plugin.getPlayers().hasIsland(playerUUID)) {
              if (!plugin.getPlayers().inTeam(playerUUID)) {
                if (plugin.getPlayers().getIslandLevel(playerUUID) < Settings.abandonedIslandLevel) {
                  removeList.add(playerUUID);
                }
              }
            }
          }
        }
      }
    }
    if (removeList.isEmpty()) {
      sender.sendMessage(ChatColor.YELLOW + Locale.purgenoneFound);
      purgeFlag=false;
      return;
    }
    sender.sendMessage(ChatColor.YELLOW + Locale.purgethisWillRemove.replace("String_Node_Str",String.valueOf(removeList.size())));
    sender.sendMessage(ChatColor.RED + Locale.purgewarning);
    sender.sendMessage(ChatColor.RED + Locale.purgetypeConfirm);
    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 + Locale.purgepurgeCancelled);
          this.cancel();
        }
 else         if (confirmOK) {
          new BukkitRunnable(){
            @Override public void run(){
              if (removeList.isEmpty() && purgeFlag) {
                purgeFlag=false;
                sender.sendMessage(ChatColor.YELLOW + Locale.purgefinished);
                this.cancel();
              }
              if (removeList.size() > 0 && purgeFlag) {
                plugin.deletePlayerIsland(removeList.get(0));
                sender.sendMessage(ChatColor.YELLOW + Locale.purgeremovingName.replace("String_Node_Str",plugin.getPlayers().getName(removeList.get(0))));
                removeList.remove(0);
              }
            }
          }
.runTaskTimer(plugin,0L,100L);
          confirmReq=false;
          confirmOK=false;
          this.cancel();
        }
      }
    }
.runTaskTimer(plugin,0L,20L);
  }
}
);
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
 else {
  plugin.getPlayers().setResetsLeft(playerUUID,Settings.resetLimit);
  sender.sendMessage(ChatColor.YELLOW + Locale.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 + Locale.errorUnknownCommand);
  return true;
}
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
 else {
  if (plugin.getPlayers().getIslandLocation(playerUUID) != null) {
    ((Player)sender).teleport(plugin.getSafeHomeLocation(playerUUID));
    return true;
  }
  sender.sendMessage(Locale.errorNoIslandOther);
  return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
 else {
  if (plugin.getPlayers().getIslandLocation(playerUUID) != null) {
    sender.sendMessage(ChatColor.YELLOW + Locale.deleteremoving.replace("String_Node_Str",split[1]));
    plugin.deletePlayerIsland(playerUUID);
    Player target=plugin.getServer().getPlayer(playerUUID);
    if (target != null) {
      plugin.resetPlayer(target);
    }
    return true;
  }
  sender.sendMessage(Locale.errorNoIslandOther);
  return true;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
if (sender instanceof Player) {
  final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
  if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
    sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
    return true;
  }
 else {
    if (adminSetPlayerIsland(sender,((Player)sender).getLocation(),playerUUID)) {
      sender.sendMessage(ChatColor.GREEN + Locale.registersettingIsland.replace("String_Node_Str",split[1]));
    }
 else {
      sender.sendMessage(ChatColor.RED + Locale.registererrorBedrockNotFound);
    }
    return true;
  }
}
 else {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.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]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
  return true;
}
plugin.getPlayers().resetAllChallenges(playerUUID);
sender.sendMessage(ChatColor.YELLOW + Locale.resetChallengessuccess.replace("String_Node_Str",split[1]));
return true;
}
 else {
return false;
}
case 3:
if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[1]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
if (!plugin.getPlayers().getTeamLeader(playerUUID).equals(playerUUID)) {
  sender.sendMessage(ChatColor.RED + "String_Node_Str" + plugin.getPlayers().getName(plugin.getPlayers().getTeamLeader(playerUUID)));
  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 + Locale.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",ASkyBlock.prettifyText(biomeName));
}
 catch (Exception e) {
sender.sendMessage(ChatColor.RED + Locale.biomeUnknown);
for (Biome b : Biome.values()) {
  if (plugin.getConfig().contains("String_Node_Str" + b.name())) {
    sender.sendMessage(b.name());
  }
}
return true;
}
if (plugin.getPlayers().inTeam(playerUUID) && plugin.getPlayers().getTeamIslandLocation(playerUUID) != null) {
plugin.setIslandBiome(plugin.getPlayers().getTeamIslandLocation(playerUUID),biome);
}
 else {
plugin.setIslandBiome(plugin.getPlayers().getIslandLocation(playerUUID),biome);
}
sender.sendMessage(ChatColor.GREEN + Locale.biomeSet.replace("String_Node_Str",biomeName));
Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
if (targetPlayer != null) {
targetPlayer.sendMessage("String_Node_Str" + ChatColor.GREEN + Locale.biomeSet.replace("String_Node_Str",biomeName));
}
 else {
plugin.setMessage(playerUUID,"String_Node_Str" + ChatColor.GREEN + Locale.biomeSet.replace("String_Node_Str",biomeName));
}
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (split[1].equalsIgnoreCase("String_Node_Str")) {
if (!plugin.getPlayers().inTeam(playerUUID)) {
  sender.sendMessage(ChatColor.RED + Locale.errorNoTeam);
  return true;
}
UUID teamLeader=plugin.getPlayers().getTeamLeader(playerUUID);
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.removeWarp(playerUUID);
  sender.sendMessage(ChatColor.RED + Locale.kicknameRemoved.replace("String_Node_Str",split[2]));
  return true;
}
 else {
  sender.sendMessage(ChatColor.RED + "String_Node_Str" + split[2]+ "String_Node_Str");
  return true;
}
}
 else {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
return false;
}
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (plugin.getPlayers().checkChallenge(playerUUID,split[1].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[1].toLowerCase())) {
sender.sendMessage(ChatColor.RED + Locale.completeChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().get(playerUUID).completeChallenge(split[1].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + Locale.completeChallengechallangeCompleted.replace("String_Node_Str",split[1].toLowerCase()).replace("String_Node_Str",split[2]));
return true;
}
 else if (split[0].equalsIgnoreCase("String_Node_Str")) {
final UUID playerUUID=plugin.getPlayers().getUUID(split[2]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (!plugin.getPlayers().checkChallenge(playerUUID,split[1].toLowerCase()) || !plugin.getPlayers().get(playerUUID).challengeExists(split[1].toLowerCase())) {
sender.sendMessage(ChatColor.RED + Locale.resetChallengeerrorChallengeDoesNotExist);
return true;
}
plugin.getPlayers().resetChallenge(playerUUID,split[1].toLowerCase());
sender.sendMessage(ChatColor.YELLOW + Locale.resetChallengechallengeReset.replace("String_Node_Str",split[1].toLowerCase()).replace("String_Node_Str",split[2]));
return true;
}
 else {
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]);
final Player targetPlayer=plugin.getServer().getPlayer(playerUUID);
final UUID teamLeader=plugin.getPlayers().getUUID(split[3]);
if (!plugin.getPlayers().isAKnownPlayer(playerUUID) || !plugin.getPlayers().isAKnownPlayer(teamLeader)) {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownPlayer);
return true;
}
if (playerUUID.equals(teamLeader)) {
sender.sendMessage(ChatColor.RED + "String_Node_Str");
return true;
}
if (!plugin.getPlayers().hasIsland(teamLeader)) {
sender.sendMessage(ChatColor.RED + "String_Node_Str");
return true;
}
if (plugin.getPlayers().inTeam(playerUUID)) {
sender.sendMessage(ChatColor.RED + Locale.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 + "String_Node_Str");
}
if (targetPlayer != null) {
targetPlayer.performCommand("String_Node_Str");
}
if (plugin.getPlayers().hasIsland(playerUUID)) {
Location islandLoc=plugin.getPlayers().getIslandLocation(playerUUID);
if (islandLoc != null) {
sender.sendMessage(ChatColor.RED + plugin.getPlayers().getName(playerUUID) + "String_Node_Str"+ islandLoc.getBlockX()+ "String_Node_Str"+ islandLoc.getBlockZ()+ "String_Node_Str");
}
}
plugin.getPlayers().setIslandLocation(playerUUID,null);
plugin.getPlayers().setHasIsland(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 + "String_Node_Str");
}
 else {
plugin.getPlayers().setHomeLocation(playerUUID,plugin.getPlayers().getIslandLocation(teamLeader));
sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
}
if (!plugin.getPlayers().getMembers(teamLeader).contains(playerUUID)) {
plugin.getPlayers().addTeamMember(teamLeader,playerUUID);
sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
}
 else {
sender.sendMessage(ChatColor.GOLD + "String_Node_Str");
}
if (targetPlayer != null) {
plugin.homeTeleport(targetPlayer);
}
return true;
}
 else {
sender.sendMessage(ChatColor.RED + Locale.errorUnknownCommand);
return false;
}
default :
return false;
}
}