Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(arg1.equalsIgnoreCase("set")){
- if(arg2.equalsIgnoreCase("pt1")){
- if(arg3.equalsIgnoreCase("lobby")){
- if(!(s instanceof Player)){
- ChatHelper.commandError(s, "You must be a player to preform this command!");
- }
- if(Arena.arenaExists(arg4)){
- FileConfiguration f = plugin.getArenaFile();
- Location l = player.getLocation();
- String arenaName = arg3;
- f.set("arenas."+arenaName+".protection.lobby.pt1.x", l.getBlockX());
- f.set("arenas."+arenaName+".protection.lobby.pt1.y", l.getBlockY());
- f.set("arenas."+arenaName+".protection.lobby.pt1.z", l.getBlockZ());
- plugin.saveArenas();
- ChatHelper.commandResponse(s, ChatColor.GREEN+"Success! Lobby Point 1 set to X: "+l.getBlockX()+" Y: "+l.getBlockY()+" Z: "+l.getBlockZ());
- return true;
- }else{
- ChatHelper.commandError(s, "Arena not found! Do /theplague list for all the arenas");
- return true;
- }
- }
- if(arg3.equalsIgnoreCase("arena")){
- if(!(s instanceof Player)){
- ChatHelper.commandError(s, "You must be a player to preform this command!");
- }
- if(Arena.arenaExists(arg4)){
- FileConfiguration f = plugin.getArenaFile();
- Location l = player.getLocation();
- String arenaName = arg3;
- f.set("arenas."+arenaName+".protection.arena.pt1.x", l.getBlockX());
- f.set("arenas."+arenaName+".protection.arena.pt1.y", l.getBlockY());
- f.set("arenas."+arenaName+".protection.arena.pt1.z", l.getBlockZ());
- ChatHelper.commandResponse(s, ChatColor.GREEN+"Success! Arena Point 1 set to X: "+l.getBlockX()+" Y: "+l.getBlockY()+" Z: "+l.getBlockZ());
- plugin.saveArenas();
- return true;
- }else{
- ChatHelper.commandError(s, "Arena not found! Do /theplague list for all the arenas");
- return true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment