mrkirby153

Untitled

Oct 20th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.61 KB | None | 0 0
  1. if(arg1.equalsIgnoreCase("set")){
  2.                 if(arg2.equalsIgnoreCase("pt1")){
  3.                     if(arg3.equalsIgnoreCase("lobby")){
  4.                         if(!(s instanceof Player)){
  5.                             ChatHelper.commandError(s, "You must be a player to preform this command!");
  6.                         }
  7.                         if(Arena.arenaExists(arg4)){
  8.                             FileConfiguration f = plugin.getArenaFile();
  9.                             Location l = player.getLocation();
  10.                             String arenaName = arg3;
  11.                             f.set("arenas."+arenaName+".protection.lobby.pt1.x", l.getBlockX());
  12.                             f.set("arenas."+arenaName+".protection.lobby.pt1.y", l.getBlockY());
  13.                             f.set("arenas."+arenaName+".protection.lobby.pt1.z", l.getBlockZ());
  14.                             plugin.saveArenas();
  15.                             ChatHelper.commandResponse(s, ChatColor.GREEN+"Success! Lobby Point 1 set to X: "+l.getBlockX()+" Y: "+l.getBlockY()+" Z: "+l.getBlockZ());
  16.                             return true;
  17.                         }else{
  18.                             ChatHelper.commandError(s, "Arena not found! Do /theplague list for all the arenas");
  19.                             return true;
  20.                         }
  21.                     }
  22.                     if(arg3.equalsIgnoreCase("arena")){
  23.                         if(!(s instanceof Player)){
  24.                             ChatHelper.commandError(s, "You must be a player to preform this command!");
  25.                         }
  26.                         if(Arena.arenaExists(arg4)){
  27.                             FileConfiguration f = plugin.getArenaFile();
  28.                             Location l = player.getLocation();
  29.                             String arenaName = arg3;
  30.                             f.set("arenas."+arenaName+".protection.arena.pt1.x", l.getBlockX());
  31.                             f.set("arenas."+arenaName+".protection.arena.pt1.y", l.getBlockY());
  32.                             f.set("arenas."+arenaName+".protection.arena.pt1.z", l.getBlockZ());
  33.                             ChatHelper.commandResponse(s, ChatColor.GREEN+"Success! Arena Point 1 set to X: "+l.getBlockX()+" Y: "+l.getBlockY()+" Z: "+l.getBlockZ());
  34.                             plugin.saveArenas();
  35.                             return true;
  36.                         }else{
  37.                             ChatHelper.commandError(s, "Arena not found! Do /theplague list for all the arenas");
  38.                             return true;
  39.                         }
  40.                     }
  41.                 }
Advertisement
Add Comment
Please, Sign In to add comment