Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 162.07 KB | None | 0 0
  1. /* 1: */ package com.wasteofplastic.askyblock.commands;
  2. /* 2: */
  3. /* 3: */ import com.google.common.collect.HashMultiset;
  4. /* 4: */ import com.google.common.collect.Multiset;
  5. /* 5: */ import com.wasteofplastic.askyblock.ASLocale;
  6. /* 6: */ import com.wasteofplastic.askyblock.ASkyBlock;
  7. /* 7: */ import com.wasteofplastic.askyblock.CoopPlay;
  8. /* 8: */ import com.wasteofplastic.askyblock.DeleteIslandChunk;
  9. /* 9: */ import com.wasteofplastic.askyblock.GridManager;
  10. /* 10: */ import com.wasteofplastic.askyblock.Island;
  11. /* 11: */ import com.wasteofplastic.askyblock.Island.Flags;
  12. /* 12: */ import com.wasteofplastic.askyblock.Messages;
  13. /* 13: */ import com.wasteofplastic.askyblock.PlayerCache;
  14. /* 14: */ import com.wasteofplastic.askyblock.Players;
  15. /* 15: */ import com.wasteofplastic.askyblock.SafeSpotTeleport;
  16. /* 16: */ import com.wasteofplastic.askyblock.Settings;
  17. /* 17: */ import com.wasteofplastic.askyblock.Settings.GameType;
  18. /* 18: */ import com.wasteofplastic.askyblock.TopTen;
  19. /* 19: */ import com.wasteofplastic.askyblock.WarpSigns;
  20. /* 20: */ import com.wasteofplastic.askyblock.listeners.ChatListener;
  21. /* 21: */ import com.wasteofplastic.askyblock.listeners.LavaCheck;
  22. /* 22: */ import com.wasteofplastic.askyblock.panels.BiomesPanel;
  23. /* 23: */ import com.wasteofplastic.askyblock.panels.ControlPanel;
  24. /* 24: */ import com.wasteofplastic.askyblock.util.Util;
  25. /* 25: */ import com.wasteofplastic.askyblock.util.VaultHelper;
  26. /* 26: */ import java.io.File;
  27. /* 27: */ import java.io.FileNotFoundException;
  28. /* 28: */ import java.io.FileWriter;
  29. /* 29: */ import java.io.FilenameFilter;
  30. /* 30: */ import java.io.IOException;
  31. /* 31: */ import java.util.ArrayList;
  32. /* 32: */ import java.util.Arrays;
  33. /* 33: */ import java.util.Date;
  34. /* 34: */ import java.util.HashMap;
  35. /* 35: */ import java.util.Iterator;
  36. /* 36: */ import java.util.List;
  37. /* 37: */ import java.util.Map;
  38. /* 38: */ import java.util.Map.Entry;
  39. /* 39: */ import java.util.NavigableSet;
  40. /* 40: */ import java.util.Scanner;
  41. /* 41: */ import java.util.Set;
  42. /* 42: */ import java.util.TreeMap;
  43. /* 43: */ import java.util.UUID;
  44. /* 44: */ import java.util.logging.Logger;
  45. /* 45: */ import org.bukkit.Bukkit;
  46. /* 46: */ import org.bukkit.ChatColor;
  47. /* 47: */ import org.bukkit.Location;
  48. /* 48: */ import org.bukkit.Material;
  49. /* 49: */ import org.bukkit.OfflinePlayer;
  50. /* 50: */ import org.bukkit.Server;
  51. /* 51: */ import org.bukkit.World;
  52. /* 52: */ import org.bukkit.block.Biome;
  53. /* 53: */ import org.bukkit.block.Block;
  54. /* 54: */ import org.bukkit.block.Sign;
  55. /* 55: */ import org.bukkit.command.Command;
  56. /* 56: */ import org.bukkit.command.CommandExecutor;
  57. /* 57: */ import org.bukkit.command.CommandSender;
  58. /* 58: */ import org.bukkit.command.TabCompleter;
  59. /* 59: */ import org.bukkit.configuration.file.FileConfiguration;
  60. /* 60: */ import org.bukkit.entity.Creature;
  61. /* 61: */ import org.bukkit.entity.Entity;
  62. /* 62: */ import org.bukkit.entity.EntityType;
  63. /* 63: */ import org.bukkit.entity.Player;
  64. /* 64: */ import org.bukkit.scheduler.BukkitRunnable;
  65. /* 65: */ import org.bukkit.scheduler.BukkitScheduler;
  66. /* 66: */ import org.bukkit.util.BlockIterator;
  67. /* 67: */ import org.bukkit.util.Vector;
  68. /* 68: */
  69. /* 69: */ public class AdminCmd
  70. /* 70: */ implements CommandExecutor, TabCompleter
  71. /* 71: */ {
  72. /* 72: */ private ASkyBlock plugin;
  73. /* 73: 89 */ private List<UUID> removeList = new ArrayList();
  74. /* 74: 90 */ private boolean purgeFlag = false;
  75. /* 75: 91 */ private boolean confirmReq = false;
  76. /* 76: 92 */ private boolean confirmOK = false;
  77. /* 77: 93 */ private int confirmTimer = 0;
  78. /* 78: 94 */ private boolean purgeUnownedConfirm = false;
  79. /* 79: 95 */ private HashMap<String, Island> unowned = new HashMap();
  80. /* 80: 96 */ private boolean asyncPending = false;
  81. /* 81: */
  82. /* 82: */ public AdminCmd(ASkyBlock aSkyBlock)
  83. /* 83: */ {
  84. /* 84: 99 */ this.plugin = aSkyBlock;
  85. /* 85: */ }
  86. /* 86: */
  87. /* 87: */ private void help(CommandSender sender, String label)
  88. /* 88: */ {
  89. /* 89: 103 */ if (!(sender instanceof Player))
  90. /* 90: */ {
  91. /* 91: 104 */ sender.sendMessage(ChatColor.YELLOW + label + " clearreset <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpclearReset);
  92. /* 92: 105 */ sender.sendMessage(ChatColor.YELLOW + label + " clearresetall:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpclearReset);
  93. /* 93: 106 */ if (Settings.useMagicCobbleGen) {
  94. /* 94: 107 */ sender.sendMessage(ChatColor.YELLOW + label + " cobblestats: " + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpcobbleStats);
  95. /* 95: */ }
  96. /* 96: 109 */ sender.sendMessage(ChatColor.YELLOW + label + " completechallenge <player> <challengename>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpcompleteChallenge);
  97. /* 97: */
  98. /* 98: 111 */ sender.sendMessage(ChatColor.YELLOW + label + " delete <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpdelete);
  99. /* 99: 112 */ sender.sendMessage(ChatColor.YELLOW + label + " info <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpinfo);
  100. /* 100: 113 */ sender.sendMessage(ChatColor.YELLOW + label + " info challenges <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpinfo);
  101. /* 101: 114 */ sender.sendMessage(ChatColor.YELLOW + label + " info:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpinfoIsland);
  102. /* 102: 115 */ if (!this.plugin.getServer().getVersion().contains("(MC: 1.7")) {
  103. /* 103: 116 */ sender.sendMessage(ChatColor.YELLOW + label + " level <player>: " + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelplevel);
  104. /* 104: */ }
  105. /* 105: 118 */ sender.sendMessage(ChatColor.YELLOW + label + " lock <player>: " + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelplock);
  106. /* 106: 119 */ sender.sendMessage(ChatColor.YELLOW + label + " purge [TimeInDays]:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelppurge);
  107. /* 107: 120 */ sender.sendMessage(ChatColor.YELLOW + label + " name <player> <island name>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpName);
  108. /* 108: 121 */ sender.sendMessage(ChatColor.YELLOW + label + " reload:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpreload);
  109. /* 109: 122 */ sender.sendMessage(ChatColor.YELLOW + label + " resetallchallenges <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpresetAllChallenges);
  110. /* 110: 123 */ sender.sendMessage(ChatColor.YELLOW + label + " resetchallenge <player> <challengename>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpresetChallenge);
  111. /* 111: */
  112. /* 112: 125 */ sender.sendMessage(ChatColor.YELLOW + label + " resethome <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpResetHome);
  113. /* 113: 126 */ sender.sendMessage(ChatColor.YELLOW + label + " resetname <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpResetName);
  114. /* 114: 127 */ sender.sendMessage(ChatColor.YELLOW + label + " setbiome <leader> <biome>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpsetBiome);
  115. /* 115: 128 */ sender.sendMessage(ChatColor.YELLOW + label + " setdeaths <player> <number>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpsetDeaths);
  116. /* 116: 129 */ sender.sendMessage(ChatColor.YELLOW + label + " settingsreset [help | all | flag]:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpSettingsReset);
  117. /* 117: 130 */ sender.sendMessage(ChatColor.YELLOW + label + " team add <player> <leader>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpadd);
  118. /* 118: 131 */ sender.sendMessage(ChatColor.YELLOW + label + " team kick <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpkick);
  119. /* 119: 132 */ sender.sendMessage(ChatColor.YELLOW + label + " topbreeders: " + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelptopBreeders);
  120. /* 120: 133 */ sender.sendMessage(ChatColor.YELLOW + label + " topten:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelptopTen);
  121. /* 121: 134 */ sender.sendMessage(ChatColor.YELLOW + label + " unregister <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpunregister);
  122. /* 122: */ }
  123. /* 123: */ else
  124. /* 124: */ {
  125. /* 125: 140 */ Player player = (Player)sender;
  126. /* 126: 141 */ player.sendMessage(this.plugin.myLocale(player.getUniqueId()).adminHelpHelp);
  127. /* 127: 142 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.clearreset")) || (player.isOp())) {
  128. /* 128: 143 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " clearreset <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpclearReset);
  129. /* 129: */ }
  130. /* 130: 145 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.clearresetall")) || (player.isOp())) {
  131. /* 131: 146 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " clearresetall:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpclearReset);
  132. /* 132: */ }
  133. /* 133: 148 */ if (((Settings.useMagicCobbleGen) && (VaultHelper.checkPerm(player, "askyblock.admin.cobblestats"))) || (player.isOp())) {
  134. /* 134: 149 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " cobblestats: " + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpcobbleStats);
  135. /* 135: */ }
  136. /* 136: 151 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.challenges")) || (player.isOp())) {
  137. /* 137: 152 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " completechallenge <player> <challengename>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpcompleteChallenge);
  138. /* 138: */ }
  139. /* 139: 155 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.delete")) || (player.isOp())) {
  140. /* 140: 156 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " delete <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpdelete);
  141. /* 141: */ }
  142. /* 142: 158 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.deleteisland")) || (player.isOp())) {
  143. /* 143: 159 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " deleteisland confirm:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpdelete);
  144. /* 144: */ }
  145. /* 145: 162 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.info")) || (player.isOp()))
  146. /* 146: */ {
  147. /* 147: 163 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " info:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpinfoIsland);
  148. /* 148: 164 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " info <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpinfo);
  149. /* 149: 165 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " info challenges <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpinfo);
  150. /* 150: */ }
  151. /* 151: 168 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.lock")) || (player.isOp())) {
  152. /* 152: 169 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " lock <player>: " + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelplock);
  153. /* 153: */ }
  154. /* 154: 171 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.name")) || (player.isOp())) {
  155. /* 155: 172 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " name <player> <island name>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpName);
  156. /* 156: */ }
  157. /* 157: 174 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.purge")) || (player.isOp()))
  158. /* 158: */ {
  159. /* 159: 175 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " purge [TimeInDays]:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelppurge);
  160. /* 160: 176 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " purge unowned:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelppurgeUnowned);
  161. /* 161: 177 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " purge allow/disallow:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelppurgeAllowDisallow);
  162. /* 162: */ }
  163. /* 163: 180 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.reload")) || (player.isOp())) {
  164. /* 164: 181 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " reload:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpreload);
  165. /* 165: */ }
  166. /* 166: 183 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.register")) || (player.isOp())) {
  167. /* 167: 184 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " register <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpregister);
  168. /* 168: */ }
  169. /* 169: 186 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.resethome")) || (player.isOp())) {
  170. /* 170: 187 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " resethome <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpResetHome);
  171. /* 171: */ }
  172. /* 172: 189 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.challenges")) || (player.isOp())) {
  173. /* 173: 190 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " resetchallenge <player> <challengename>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpresetChallenge);
  174. /* 174: */ }
  175. /* 175: 193 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.challenges")) || (player.isOp())) {
  176. /* 176: 194 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " resetallchallenges <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpresetAllChallenges);
  177. /* 177: */ }
  178. /* 178: 197 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.resetname")) || (player.isOp())) {
  179. /* 179: 198 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " resetname <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpResetName);
  180. /* 180: */ }
  181. /* 181: 200 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.signadmin")) || (player.isOp()))
  182. /* 182: */ {
  183. /* 183: 201 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " resetsign:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpResetSign);
  184. /* 184: 202 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " resetsign <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpResetSign);
  185. /* 185: */ }
  186. /* 186: 204 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.reserve")) || (player.isOp())) {
  187. /* 187: 205 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " reserve <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpReserve);
  188. /* 188: */ }
  189. /* 189: 207 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.setbiome")) || (player.isOp())) {
  190. /* 190: 208 */ sender.sendMessage(ChatColor.YELLOW + "/" + label + " setbiome <leader> <biome>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpsetBiome);
  191. /* 191: */ }
  192. /* 192: 210 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.setdeaths")) || (player.isOp())) {
  193. /* 193: 211 */ sender.sendMessage(ChatColor.YELLOW + label + " setdeaths <player> <number>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpsetDeaths);
  194. /* 194: */ }
  195. /* 195: 213 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.resethome")) || (player.isOp())) {
  196. /* 196: 214 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " sethome <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpSetHome);
  197. /* 197: */ }
  198. /* 198: 216 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.setspawn")) || (player.isOp())) {
  199. /* 199: 217 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " setspawn:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpSetSpawn);
  200. /* 200: */ }
  201. /* 201: 219 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.setrange")) || (player.isOp()))
  202. /* 202: */ {
  203. /* 203: 220 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " setrange <number>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpSetRange);
  204. /* 204: 221 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " addrange <+/- number>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpAddRange);
  205. /* 205: */ }
  206. /* 206: 223 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.settingsreset")) || (player.isOp())) {
  207. /* 207: 224 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " settingsreset [help | all | flag]:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpSettingsReset);
  208. /* 208: */ }
  209. /* 209: 226 */ if (((Settings.teamChat) && (VaultHelper.checkPerm(player, "askyblock.mod.spy"))) || (player.isOp())) {
  210. /* 210: 227 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " spy:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpTeamChatSpy);
  211. /* 211: */ }
  212. /* 212: 229 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.team")) || (player.isOp()))
  213. /* 213: */ {
  214. /* 214: 230 */ sender.sendMessage(ChatColor.YELLOW + "/" + label + " team kick <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpkick);
  215. /* 215: 231 */ sender.sendMessage(ChatColor.YELLOW + "/" + label + " team add <player> <leader>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpadd);
  216. /* 216: */ }
  217. /* 217: 236 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.topten")) || (player.isOp())) {
  218. /* 218: 237 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " topten:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelptopTen);
  219. /* 219: */ }
  220. /* 220: 239 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.topbreeders")) || (player.isOp())) {
  221. /* 221: 240 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " topbreeders: " + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelptopBreeders);
  222. /* 222: */ }
  223. /* 223: 242 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.tp")) || (player.isOp())) {
  224. /* 224: 243 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " tp <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelptp);
  225. /* 225: */ }
  226. /* 226: 245 */ if ((Settings.createNether) && (Settings.newNether) && (ASkyBlock.getNetherWorld() != null) && ((VaultHelper.checkPerm(player, "askyblock.mod.tpnether")) || (player.isOp()))) {
  227. /* 227: 246 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " tpnether <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelptpNether);
  228. /* 228: */ }
  229. /* 229: 249 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.unregister")) || (player.isOp())) {
  230. /* 230: 250 */ player.sendMessage(ChatColor.YELLOW + "/" + label + " unregister <player>:" + ChatColor.WHITE + " " + this.plugin.myLocale(player.getUniqueId()).adminHelpunregister);
  231. /* 231: */ }
  232. /* 232: */ }
  233. /* 233: */ }
  234. /* 234: */
  235. /* 235: */ public boolean onCommand(final CommandSender sender, Command command, String label, String[] split)
  236. /* 236: */ {
  237. /* 237: 266 */ if ((sender instanceof Player))
  238. /* 238: */ {
  239. /* 239: 267 */ Player player = (Player)sender;
  240. /* 240: 268 */ if (split.length > 0) {
  241. /* 241: 270 */ if ((split[0].equalsIgnoreCase("reload")) || (split[0].equalsIgnoreCase("register")) || (split[0].equalsIgnoreCase("delete")) || (split[0].equalsIgnoreCase("purge")) || (split[0].equalsIgnoreCase("confirm")) || (split[0].equalsIgnoreCase("setspawn")) || (split[0].equalsIgnoreCase("deleteisland")) || (split[0].equalsIgnoreCase("setrange")) || (split[0].equalsIgnoreCase("reserve")) || (split[0].equalsIgnoreCase("addrange")) || (split[0].equalsIgnoreCase("unregister")) || (split[0].equalsIgnoreCase("clearresetall")) || (split[0].equalsIgnoreCase("settingsreset")) || (split[0].equalsIgnoreCase("cobblestats")))
  242. /* 242: */ {
  243. /* 243: 276 */ if (!checkAdminPerms(player, split))
  244. /* 244: */ {
  245. /* 245: 277 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorNoPermission);
  246. /* 246: 278 */ return true;
  247. /* 247: */ }
  248. /* 248: */ }
  249. /* 249: 282 */ else if (!checkModPerms(player, split))
  250. /* 250: */ {
  251. /* 251: 283 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorNoPermission);
  252. /* 252: 284 */ return true;
  253. /* 253: */ }
  254. /* 254: */ }
  255. /* 255: */ }
  256. /* 256: 290 */ if ((split.length > 1) && (split[0].equalsIgnoreCase("name")))
  257. /* 257: */ {
  258. /* 258: 291 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  259. /* 259: 294 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  260. /* 260: */ {
  261. /* 261: 295 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  262. /* 262: 296 */ return true;
  263. /* 263: */ }
  264. /* 264: 298 */ if (split.length == 2)
  265. /* 265: */ {
  266. /* 266: 300 */ sender.sendMessage(this.plugin.getGrid().getIslandName(playerUUID));
  267. /* 267: */ }
  268. /* 268: */ else
  269. /* 269: */ {
  270. /* 270: 302 */ String name = split[2];
  271. /* 271: 303 */ for (int i = 3; i < split.length; i++) {
  272. /* 272: 304 */ name = name + " " + split[i];
  273. /* 273: */ }
  274. /* 274: 306 */ if (name.length() < Settings.minNameLength)
  275. /* 275: */ {
  276. /* 276: 307 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorTooShort.replace("[length]", String.valueOf(Settings.minNameLength)));
  277. /* 277: 308 */ return true;
  278. /* 278: */ }
  279. /* 279: 310 */ if (name.length() > Settings.maxNameLength)
  280. /* 280: */ {
  281. /* 281: 311 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorTooLong.replace("[length]", String.valueOf(Settings.maxNameLength)));
  282. /* 282: 312 */ return true;
  283. /* 283: */ }
  284. /* 284: 314 */ this.plugin.getGrid().setIslandName(playerUUID, ChatColor.translateAlternateColorCodes('&', name));
  285. /* 285: 315 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().generalSuccess);
  286. /* 286: */ }
  287. /* 287: 317 */ return true;
  288. /* 288: */ }
  289. /* 289: 323 */ switch (split.length)
  290. /* 290: */ {
  291. /* 291: */ case 0:
  292. /* 292: 325 */ help(sender, label);
  293. /* 293: 326 */ return true;
  294. /* 294: */ case 1:
  295. /* 295: 328 */ if (split[0].equalsIgnoreCase("cobblestats"))
  296. /* 296: */ {
  297. /* 297: 329 */ if (LavaCheck.getStats().size() == 0)
  298. /* 298: */ {
  299. /* 299: 330 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().banNone);
  300. /* 300: 331 */ return true;
  301. /* 301: */ }
  302. /* 302: 333 */ for (Material mat : LavaCheck.getStats().elementSet()) {
  303. /* 303: 334 */ sender.sendMessage(mat + ": " + LavaCheck.getStats().count(mat) + "/" + LavaCheck.getStats().size() + " or " + (int)(LavaCheck.getStats().count(mat) / LavaCheck.getStats().size() * 100.0D) + "%");
  304. /* 304: */ }
  305. /* 305: 337 */ return true;
  306. /* 306: */ }
  307. /* 307: 339 */ if (split[0].equalsIgnoreCase("setdeaths"))
  308. /* 308: */ {
  309. /* 309: 340 */ sender.sendMessage(ChatColor.YELLOW + label + " setdeaths <player> <number>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpsetDeaths);
  310. /* 310: 341 */ return true;
  311. /* 311: */ }
  312. /* 312: 343 */ if (split[0].equalsIgnoreCase("settingsreset"))
  313. /* 313: */ {
  314. /* 314: 344 */ sender.sendMessage(ChatColor.YELLOW + label + " settingsreset help");
  315. /* 315: 345 */ return true;
  316. /* 316: */ }
  317. /* 317: 347 */ if ((Settings.teamChat) && (split[0].equalsIgnoreCase("spy")))
  318. /* 318: */ {
  319. /* 319: 348 */ if (!(sender instanceof Player))
  320. /* 320: */ {
  321. /* 321: 349 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminLockerrorInGame);
  322. /* 322: 350 */ return true;
  323. /* 323: */ }
  324. /* 324: 352 */ Player player = (Player)sender;
  325. /* 325: 353 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.spy")) || (player.isOp()))
  326. /* 326: */ {
  327. /* 327: 354 */ if (this.plugin.getChatListener().toggleSpy(player.getUniqueId())) {
  328. /* 328: 355 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().teamChatStatusOn);
  329. /* 329: */ } else {
  330. /* 330: 357 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().teamChatStatusOff);
  331. /* 331: */ }
  332. /* 332: 359 */ return true;
  333. /* 333: */ }
  334. /* 334: */ }
  335. /* 335: */ else
  336. /* 336: */ {
  337. /* 337: 361 */ if (split[0].equalsIgnoreCase("lock"))
  338. /* 338: */ {
  339. /* 339: 363 */ if (!(sender instanceof Player))
  340. /* 340: */ {
  341. /* 341: 364 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminLockerrorInGame);
  342. /* 342: 365 */ return true;
  343. /* 343: */ }
  344. /* 344: 367 */ Player player = (Player)sender;
  345. /* 345: 368 */ Island island = this.plugin.getGrid().getIslandAt(player.getLocation());
  346. /* 346: 370 */ if (island == null)
  347. /* 347: */ {
  348. /* 348: 371 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorNotOnIsland);
  349. /* 349: 372 */ return true;
  350. /* 350: */ }
  351. /* 351: 374 */ Player owner = this.plugin.getServer().getPlayer(island.getOwner());
  352. /* 352: 375 */ if (island.isLocked())
  353. /* 353: */ {
  354. /* 354: 376 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().lockUnlocking);
  355. /* 355: 377 */ island.setLocked(false);
  356. /* 356: 378 */ if (owner != null) {
  357. /* 357: 379 */ owner.sendMessage(this.plugin.myLocale(owner.getUniqueId()).adminLockadminUnlockedIsland);
  358. /* 358: */ } else {
  359. /* 359: 381 */ this.plugin.getMessages().setMessage(island.getOwner(), this.plugin.myLocale(island.getOwner()).adminLockadminUnlockedIsland);
  360. /* 360: */ }
  361. /* 361: */ }
  362. /* 362: */ else
  363. /* 363: */ {
  364. /* 364: 384 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().lockLocking);
  365. /* 365: 385 */ island.setLocked(true);
  366. /* 366: 386 */ if (owner != null) {
  367. /* 367: 387 */ owner.sendMessage(this.plugin.myLocale(owner.getUniqueId()).adminLockadminLockedIsland);
  368. /* 368: */ } else {
  369. /* 369: 389 */ this.plugin.getMessages().setMessage(island.getOwner(), this.plugin.myLocale(island.getOwner()).adminLockadminLockedIsland);
  370. /* 370: */ }
  371. /* 371: */ }
  372. /* 372: 392 */ return true;
  373. /* 373: */ }
  374. /* 374: 396 */ if (split[0].equalsIgnoreCase("topbreeders"))
  375. /* 375: */ {
  376. /* 376: 398 */ sender.sendMessage(this.plugin.myLocale().adminTopBreedersFinding);
  377. /* 377: */
  378. /* 378: */
  379. /* 379: 401 */ sender.sendMessage(this.plugin.myLocale().adminTopBreedersChecking.replace("[number]", String.valueOf(this.plugin.getGrid().getOwnershipMap().size())));
  380. /* 380: */
  381. /* 381: 403 */ final List<Entity> allEntities = ASkyBlock.getIslandWorld().getEntities();
  382. /* 382: 404 */ final World islandWorld = ASkyBlock.getIslandWorld();
  383. /* 383: 405 */ final World netherWorld = ASkyBlock.getNetherWorld();
  384. /* 384: 406 */ this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, new Runnable()
  385. /* 385: */ {
  386. /* 386: */ public void run()
  387. /* 387: */ {
  388. /* 388: 410 */ Map<UUID, Multiset<EntityType>> result = new HashMap();
  389. /* 389: 412 */ for (Entity entity : allEntities) {
  390. /* 390: 414 */ if ((entity.getLocation().getWorld().equals(islandWorld)) || (entity.getLocation().getWorld().equals(netherWorld))) {
  391. /* 391: 416 */ if (((entity instanceof Creature)) && (!(entity instanceof Player)))
  392. /* 392: */ {
  393. /* 393: 419 */ Island island = AdminCmd.this.plugin.getGrid().getIslandAt(entity.getLocation());
  394. /* 394: 420 */ if ((island != null) && (!island.isSpawn()))
  395. /* 395: */ {
  396. /* 396: 423 */ UUID owner = island.getOwner();
  397. /* 397: 424 */ Multiset<EntityType> count = (Multiset)result.get(owner);
  398. /* 398: 425 */ if (count == null) {
  399. /* 399: 428 */ count = HashMultiset.create();
  400. /* 400: */ }
  401. /* 401: 430 */ count.add(entity.getType());
  402. /* 402: 431 */ result.put(owner, count);
  403. /* 403: */ }
  404. /* 404: */ }
  405. /* 405: */ }
  406. /* 406: */ }
  407. /* 407: 437 */ TreeMap<Integer, List<UUID>> topEntityIslands = new TreeMap();
  408. /* 408: 438 */ for (Map.Entry<UUID, Multiset<EntityType>> entry : result.entrySet())
  409. /* 409: */ {
  410. /* 410: 439 */ int numOfEntities = ((Multiset)entry.getValue()).size();
  411. /* 411: 440 */ List<UUID> players = (List)topEntityIslands.get(Integer.valueOf(numOfEntities));
  412. /* 412: 441 */ if (players == null) {
  413. /* 413: 442 */ players = new ArrayList();
  414. /* 414: */ }
  415. /* 415: 444 */ players.add(entry.getKey());
  416. /* 416: 445 */ topEntityIslands.put(Integer.valueOf(numOfEntities), players);
  417. /* 417: */ }
  418. /* 418: 447 */ final TreeMap<Integer, List<UUID>> topBreeders = topEntityIslands;
  419. /* 419: 448 */ final Map<UUID, Multiset<EntityType>> finalResult = result;
  420. /* 420: */
  421. /* 421: 450 */ AdminCmd.this.plugin.getServer().getScheduler().runTask(AdminCmd.this.plugin, new Runnable()
  422. /* 422: */ {
  423. /* 423: */ public void run()
  424. /* 424: */ {
  425. /* 425: 454 */ if (topBreeders.isEmpty())
  426. /* 426: */ {
  427. /* 427: 455 */ AdminCmd.1.this.val$sender.sendMessage(AdminCmd.this.plugin.myLocale().adminTopBreedersNothing);
  428. /* 428: 456 */ return;
  429. /* 429: */ }
  430. /* 430: 458 */ int rank = 1;
  431. /* 431: 460 */ for (Iterator i$ = topBreeders.descendingKeySet().iterator(); i$.hasNext();)
  432. /* 432: */ {
  433. /* 433: 460 */ int numOfEntities = ((Integer)i$.next()).intValue();
  434. /* 434: 462 */ if (numOfEntities > 5)
  435. /* 435: */ {
  436. /* 436: 464 */ List<UUID> owners = (List)topBreeders.get(Integer.valueOf(numOfEntities));
  437. /* 437: 466 */ for (UUID owner : owners)
  438. /* 438: */ {
  439. /* 439: 467 */ AdminCmd.1.this.val$sender.sendMessage("#" + rank + " " + AdminCmd.this.plugin.getPlayers().getName(owner) + " = " + numOfEntities);
  440. /* 440: 468 */ String content = "";
  441. /* 441: 469 */ Multiset<EntityType> entityCount = (Multiset)finalResult.get(owner);
  442. /* 442: 470 */ for (EntityType entity : entityCount.elementSet())
  443. /* 443: */ {
  444. /* 444: 471 */ int num = entityCount.count(entity);
  445. /* 445: 472 */ String color = ChatColor.GREEN.toString();
  446. /* 446: 473 */ if ((num > 10) && (num <= 20)) {
  447. /* 447: 474 */ color = ChatColor.YELLOW.toString();
  448. /* 448: 475 */ } else if ((num > 20) && (num <= 40)) {
  449. /* 449: 476 */ color = ChatColor.GOLD.toString();
  450. /* 450: 477 */ } else if (num > 40) {
  451. /* 451: 478 */ color = ChatColor.RED.toString();
  452. /* 452: */ }
  453. /* 453: 480 */ content = content + Util.prettifyText(entity.toString()) + " x " + color + num + ChatColor.WHITE + ", ";
  454. /* 454: */ }
  455. /* 455: 482 */ int lastComma = content.lastIndexOf(",");
  456. /* 456: 485 */ if (lastComma > 0) {
  457. /* 457: 486 */ content = content.substring(0, lastComma);
  458. /* 458: */ }
  459. /* 459: 488 */ AdminCmd.1.this.val$sender.sendMessage(" " + content);
  460. /* 460: */ }
  461. /* 461: 491 */ rank++;
  462. /* 462: 492 */ if (rank > 10) {
  463. /* 463: */ break;
  464. /* 464: */ }
  465. /* 465: */ }
  466. /* 466: */ }
  467. /* 467: 498 */ if (rank == 1) {
  468. /* 468: 499 */ AdminCmd.1.this.val$sender.sendMessage(AdminCmd.this.plugin.myLocale().adminTopBreedersNothing);
  469. /* 469: */ }
  470. /* 470: */ }
  471. /* 471: */ });
  472. /* 472: */ }
  473. /* 473: 504 */ });
  474. /* 474: 505 */ return true;
  475. /* 475: */ }
  476. /* 476: */ }
  477. /* 477: 508 */ if (split[0].equalsIgnoreCase("deleteisland"))
  478. /* 478: */ {
  479. /* 479: 509 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminDeleteIslandError);
  480. /* 480: 510 */ return true;
  481. /* 481: */ }
  482. /* 482: 513 */ if (split[0].equalsIgnoreCase("setspawn"))
  483. /* 483: */ {
  484. /* 484: 515 */ if (!(sender instanceof Player))
  485. /* 485: */ {
  486. /* 486: 516 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUseInGame);
  487. /* 487: 517 */ return true;
  488. /* 488: */ }
  489. /* 489: 519 */ Player player = (Player)sender;
  490. /* 490: 521 */ if (!player.getLocation().getWorld().getName().equals(Settings.worldName))
  491. /* 491: */ {
  492. /* 492: 522 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorWrongWorld);
  493. /* 493: 523 */ return true;
  494. /* 494: */ }
  495. /* 495: 526 */ Location closestIsland = getClosestIsland(player.getLocation());
  496. /* 496: 527 */ Island oldSpawn = this.plugin.getGrid().getSpawn();
  497. /* 497: 528 */ Island newSpawn = this.plugin.getGrid().getIslandAt(closestIsland);
  498. /* 498: 529 */ if ((newSpawn != null) && (newSpawn.isSpawn()))
  499. /* 499: */ {
  500. /* 500: 531 */ this.plugin.getGrid().setSpawnPoint(player.getLocation());
  501. /* 501: */
  502. /* 502: 533 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminSetSpawnset);
  503. /* 503: 534 */ return true;
  504. /* 504: */ }
  505. /* 505: 537 */ if ((newSpawn != null) && (newSpawn.getOwner() != null))
  506. /* 506: */ {
  507. /* 507: 538 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetSpawnownedBy.replace("[name]", this.plugin.getPlayers().getName(newSpawn.getOwner())));
  508. /* 508: 539 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetSpawnmove);
  509. /* 509: 540 */ return true;
  510. /* 510: */ }
  511. /* 511: 542 */ if (oldSpawn != null)
  512. /* 512: */ {
  513. /* 513: 543 */ sender.sendMessage(ChatColor.GOLD + "Changing spawn island location. Warning: old spawn island location at " + oldSpawn.getCenter().getBlockX() + "," + oldSpawn.getCenter().getBlockZ() + " will be at risk of being overwritten with new islands. Recommend to clear that old area.");
  514. /* 514: */
  515. /* 515: */
  516. /* 516: 546 */ this.plugin.getGrid().deleteSpawn();
  517. /* 517: */ }
  518. /* 518: 549 */ if (newSpawn == null) {
  519. /* 519: 551 */ newSpawn = this.plugin.getGrid().addIsland(closestIsland.getBlockX(), closestIsland.getBlockZ());
  520. /* 520: */ }
  521. /* 521: 553 */ this.plugin.getGrid().setSpawn(newSpawn);
  522. /* 522: 554 */ this.plugin.getGrid().setSpawnPoint(player.getLocation());
  523. /* 523: */
  524. /* 524: 556 */ player.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminSetSpawnsetting.replace("[location]", new StringBuilder().append(player.getLocation().getBlockX()).append(",").append(player.getLocation().getBlockZ()).toString()));
  525. /* 525: 557 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncenter.replace("[location]", new StringBuilder().append(newSpawn.getCenter().getBlockX()).append(",").append(newSpawn.getCenter().getBlockZ()).toString()));
  526. /* 526: 558 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnlimits.replace("[min]", new StringBuilder().append(newSpawn.getMinX()).append(",").append(newSpawn.getMinZ()).toString()).replace("[max]", new StringBuilder().append(newSpawn.getMinX() + newSpawn.getIslandDistance() - 1).append(",").append(newSpawn.getMinZ() + newSpawn.getIslandDistance() - 1).toString()));
  527. /* 527: */
  528. /* 528: 560 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnrange.replace("[number]", String.valueOf(newSpawn.getProtectionSize())));
  529. /* 529: 561 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncoords.replace("[min]", new StringBuilder().append(newSpawn.getMinProtectedX()).append(", ").append(newSpawn.getMinProtectedZ()).toString()).replace("[max]", new StringBuilder().append(newSpawn.getMinProtectedX() + newSpawn.getProtectionSize() - 1).append(", ").append(newSpawn.getMinProtectedZ() + newSpawn.getProtectionSize() - 1).toString()));
  530. /* 530: 564 */ if (newSpawn.isLocked()) {
  531. /* 531: 565 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetSpawnlocked);
  532. /* 532: */ }
  533. /* 533: 567 */ return true;
  534. /* 534: */ }
  535. /* 535: 568 */ if ((split[0].equalsIgnoreCase("info")) || (split[0].equalsIgnoreCase("setrange")))
  536. /* 536: */ {
  537. /* 537: 570 */ if (!(sender instanceof Player))
  538. /* 538: */ {
  539. /* 539: 571 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUseInGame);
  540. /* 540: 572 */ return true;
  541. /* 541: */ }
  542. /* 542: 574 */ Location closestIsland = getClosestIsland(((Player)sender).getLocation());
  543. /* 543: 575 */ if (closestIsland == null)
  544. /* 544: */ {
  545. /* 545: 576 */ sender.sendMessage(ChatColor.RED + "Sorry, could not find an island. Move closer?");
  546. /* 546: 577 */ return true;
  547. /* 547: */ }
  548. /* 548: 579 */ Island island = this.plugin.getGrid().getIslandAt(closestIsland);
  549. /* 549: 580 */ if ((island != null) && (island.isSpawn()))
  550. /* 550: */ {
  551. /* 551: 581 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminInfotitle);
  552. /* 552: 582 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncenter.replace("[location]", new StringBuilder().append(island.getCenter().getBlockX()).append(",").append(island.getCenter().getBlockZ()).toString()));
  553. /* 553: 583 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnlimits.replace("[min]", new StringBuilder().append(island.getMinX()).append(",").append(island.getMinZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinX() + island.getIslandDistance() - 1).append(",").append(island.getMinZ() + island.getIslandDistance() - 1).toString()));
  554. /* 554: */
  555. /* 555: 585 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnrange.replace("[number]", String.valueOf(island.getProtectionSize())));
  556. /* 556: 586 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncoords.replace("[min]", new StringBuilder().append(island.getMinProtectedX()).append(", ").append(island.getMinProtectedZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinProtectedX() + island.getProtectionSize() - 1).append(", ").append(island.getMinProtectedZ() + island.getProtectionSize() - 1).toString()));
  557. /* 557: 589 */ if (island.isLocked()) {
  558. /* 558: 590 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetSpawnlocked);
  559. /* 559: */ }
  560. /* 560: 592 */ return true;
  561. /* 561: */ }
  562. /* 562: 594 */ if (island == null) {
  563. /* 563: 595 */ this.plugin.getLogger().info("Get island at was null" + closestIsland);
  564. /* 564: */ }
  565. /* 565: 597 */ UUID target = this.plugin.getPlayers().getPlayerFromIslandLocation(closestIsland);
  566. /* 566: 598 */ if (target == null)
  567. /* 567: */ {
  568. /* 568: 599 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminInfounowned);
  569. /* 569: 600 */ return true;
  570. /* 570: */ }
  571. /* 571: 602 */ showInfo(target, sender);
  572. /* 572: 603 */ return true;
  573. /* 573: */ }
  574. /* 574: 604 */ if (split[0].equalsIgnoreCase("resetsign"))
  575. /* 575: */ {
  576. /* 576: 606 */ if (!(sender instanceof Player))
  577. /* 577: */ {
  578. /* 578: 607 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUseInGame);
  579. /* 579: 608 */ return true;
  580. /* 580: */ }
  581. /* 581: 610 */ Player player = (Player)sender;
  582. /* 582: 611 */ if ((!VaultHelper.checkPerm(player, "askyblock.mod.signadmin")) && (!player.isOp()))
  583. /* 583: */ {
  584. /* 584: 612 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorNoPermission);
  585. /* 585: 613 */ return true;
  586. /* 586: */ }
  587. /* 587: 617 */ BlockIterator iter = new BlockIterator(player, 10);
  588. /* 588: 618 */ Block lastBlock = iter.next();
  589. /* 589: */ do
  590. /* 590: */ {
  591. /* 591: 619 */ if (!iter.hasNext()) {
  592. /* 592: */ break;
  593. /* 593: */ }
  594. /* 594: 620 */ lastBlock = iter.next();
  595. /* 595: 621 */ } while (lastBlock.getType() == Material.AIR);
  596. /* 596: 625 */ if (!lastBlock.getType().equals(Material.SIGN_POST))
  597. /* 597: */ {
  598. /* 598: 626 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).adminResetSignNoSign);
  599. /* 599: 627 */ return true;
  600. /* 600: */ }
  601. /* 601: 630 */ Sign sign = (Sign)lastBlock.getState();
  602. /* 602: 631 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale(player.getUniqueId()).adminResetSignFound);
  603. /* 603: */
  604. /* 604: */
  605. /* 605: */
  606. /* 606: 635 */ UUID target = this.plugin.getPlayers().getPlayerFromIslandLocation(player.getLocation());
  607. /* 607: 636 */ if (target == null)
  608. /* 608: */ {
  609. /* 609: 637 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).adminInfounowned);
  610. /* 610: 638 */ return true;
  611. /* 611: */ }
  612. /* 612: 640 */ if (this.plugin.getWarpSignsListener().addWarp(target, lastBlock.getLocation()))
  613. /* 613: */ {
  614. /* 614: 642 */ sign.setLine(0, ChatColor.GREEN + this.plugin.myLocale().warpswelcomeLine);
  615. /* 615: 643 */ sign.update();
  616. /* 616: 644 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale(player.getUniqueId()).adminResetSignRescued.replace("[name]", this.plugin.getPlayers().getName(target)));
  617. /* 617: 645 */ return true;
  618. /* 618: */ }
  619. /* 619: 648 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).adminResetSignErrorExists.replace("[name]", this.plugin.getWarpSignsListener().getWarpOwner(lastBlock.getLocation())));
  620. /* 620: 649 */ return true;
  621. /* 621: */ }
  622. /* 622: 651 */ if (split[0].equalsIgnoreCase("reload"))
  623. /* 623: */ {
  624. /* 624: 652 */ this.plugin.reloadConfig();
  625. /* 625: 653 */ this.plugin.loadPluginConfig();
  626. /* 626: 654 */ this.plugin.getChallenges().reloadChallengeConfig();
  627. /* 627: 655 */ if ((Settings.useEconomy) && (VaultHelper.setupEconomy())) {
  628. /* 628: 656 */ ControlPanel.loadShop();
  629. /* 629: */ } else {
  630. /* 630: 658 */ Settings.useEconomy = false;
  631. /* 631: */ }
  632. /* 632: 660 */ ControlPanel.loadControlPanel();
  633. /* 633: 661 */ if (Settings.updateCheck) {
  634. /* 634: 662 */ this.plugin.checkUpdates();
  635. /* 635: */ } else {
  636. /* 636: 664 */ this.plugin.setUpdateCheck(null);
  637. /* 637: */ }
  638. /* 638: 666 */ this.plugin.getIslandCmd().loadSchematics();
  639. /* 639: 667 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().reloadconfigReloaded);
  640. /* 640: 668 */ return true;
  641. /* 641: */ }
  642. /* 642: 669 */ if (split[0].equalsIgnoreCase("topten"))
  643. /* 643: */ {
  644. /* 644: 670 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminTopTengenerating);
  645. /* 645: 671 */ TopTen.topTenCreate(sender);
  646. /* 646: 672 */ return true;
  647. /* 647: */ }
  648. /* 648: 673 */ if (split[0].equalsIgnoreCase("purge"))
  649. /* 649: */ {
  650. /* 650: 674 */ if (this.purgeFlag)
  651. /* 651: */ {
  652. /* 652: 675 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().purgealreadyRunning);
  653. /* 653: 676 */ return true;
  654. /* 654: */ }
  655. /* 655: 678 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().purgeusage.replace("[label]", label));
  656. /* 656: 679 */ return true;
  657. /* 657: */ }
  658. /* 658: 680 */ if (split[0].equalsIgnoreCase("confirm"))
  659. /* 659: */ {
  660. /* 660: 681 */ if (!this.confirmReq)
  661. /* 661: */ {
  662. /* 662: 682 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().confirmerrorTimeLimitExpired);
  663. /* 663: 683 */ return true;
  664. /* 664: */ }
  665. /* 665: 686 */ this.confirmOK = true;
  666. /* 666: 687 */ this.confirmReq = false;
  667. /* 667: */
  668. /* 668: 689 */ return true;
  669. /* 669: */ }
  670. /* 670: 692 */ if (split[0].equalsIgnoreCase("clearresetall"))
  671. /* 671: */ {
  672. /* 672: 693 */ if (this.asyncPending)
  673. /* 673: */ {
  674. /* 674: 694 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorCommandNotReady);
  675. /* 675: 695 */ return true;
  676. /* 676: */ }
  677. /* 677: 698 */ this.plugin.getPlayers().clearResets(Settings.resetLimit);
  678. /* 678: */
  679. /* 679: 700 */ final File playerFolder = this.plugin.getPlayersFolder();
  680. /* 680: */
  681. /* 681: 702 */ this.asyncPending = true;
  682. /* 682: */
  683. /* 683: 704 */ this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, new Runnable()
  684. /* 684: */ {
  685. /* 685: */ public void run()
  686. /* 686: */ {
  687. /* 687: 709 */ int done = 0;
  688. /* 688: */
  689. /* 689: 711 */ FilenameFilter ymlFilter = new FilenameFilter()
  690. /* 690: */ {
  691. /* 691: */ public boolean accept(File dir, String name)
  692. /* 692: */ {
  693. /* 693: 714 */ String lowercaseName = name.toLowerCase();
  694. /* 694: 715 */ if (lowercaseName.endsWith(".yml")) {
  695. /* 695: 716 */ return true;
  696. /* 696: */ }
  697. /* 697: 718 */ return false;
  698. /* 698: */ }
  699. /* 699: */ };
  700. /* 700: 722 */ for (File file : playerFolder.listFiles(ymlFilter))
  701. /* 701: */ {
  702. /* 702: 723 */ List<String> playerFileContents = new ArrayList();
  703. /* 703: 724 */ done++;
  704. /* 704: */ try
  705. /* 705: */ {
  706. /* 706: 726 */ Scanner scanner = new Scanner(file);
  707. /* 707: 727 */ while (scanner.hasNextLine())
  708. /* 708: */ {
  709. /* 709: 728 */ String lineFromFile = scanner.nextLine();
  710. /* 710: 729 */ if (lineFromFile.contains("resetsLeft:")) {
  711. /* 711: 730 */ playerFileContents.add("resetsLeft: " + Settings.resetLimit);
  712. /* 712: */ } else {
  713. /* 713: 732 */ playerFileContents.add(lineFromFile);
  714. /* 714: */ }
  715. /* 715: */ }
  716. /* 716: 735 */ scanner.close();
  717. /* 717: */
  718. /* 718: 737 */ FileWriter writer = new FileWriter(file);
  719. /* 719: 738 */ for (String str : playerFileContents) {
  720. /* 720: 739 */ writer.write(str + "\n");
  721. /* 721: */ }
  722. /* 722: 741 */ writer.close();
  723. /* 723: 742 */ if (done % 500 == 0)
  724. /* 724: */ {
  725. /* 725: 743 */ final int update = done;
  726. /* 726: 744 */ AdminCmd.this.plugin.getServer().getScheduler().runTask(AdminCmd.this.plugin, new Runnable()
  727. /* 727: */ {
  728. /* 728: */ public void run()
  729. /* 729: */ {
  730. /* 730: 749 */ AdminCmd.2.this.val$sender.sendMessage(ChatColor.GREEN + AdminCmd.this.plugin.myLocale().clearedResetLimit + " [" + update + " players]...");
  731. /* 731: */ }
  732. /* 732: */ });
  733. /* 733: */ }
  734. /* 734: */ }
  735. /* 735: */ catch (FileNotFoundException e)
  736. /* 736: */ {
  737. /* 737: 753 */ e.printStackTrace();
  738. /* 738: */ }
  739. /* 739: */ catch (IOException e)
  740. /* 740: */ {
  741. /* 741: 756 */ e.printStackTrace();
  742. /* 742: */ }
  743. /* 743: */ }
  744. /* 744: 760 */ AdminCmd.this.asyncPending = false;
  745. /* 745: 761 */ sender.sendMessage(ChatColor.YELLOW + AdminCmd.this.plugin.myLocale().clearedResetLimit + " [" + done + " players] completed.");
  746. /* 746: */ }
  747. /* 747: 762 */ });
  748. /* 748: 763 */ return true;
  749. /* 749: */ }
  750. /* 750: 765 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownCommand);
  751. /* 751: 766 */ return false;
  752. /* 752: */ case 2:
  753. /* 753: 769 */ if ((!this.plugin.getServer().getVersion().contains("(MC: 1.7")) &&
  754. /* 754: 770 */ (split[0].equalsIgnoreCase("level")))
  755. /* 755: */ {
  756. /* 756: 772 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  757. /* 757: 775 */ if (playerUUID == null)
  758. /* 758: */ {
  759. /* 759: 776 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  760. /* 760: 777 */ return true;
  761. /* 761: */ }
  762. /* 762: 779 */ if ((sender instanceof Player)) {
  763. /* 763: 780 */ this.plugin.getIslandCmd().calculateIslandLevel(sender, playerUUID, false);
  764. /* 764: */ } else {
  765. /* 765: 782 */ this.plugin.getIslandCmd().calculateIslandLevel(sender, playerUUID, true);
  766. /* 766: */ }
  767. /* 767: 784 */ return true;
  768. /* 768: */ }
  769. /* 769: 788 */ if (split[0].equalsIgnoreCase("settingsreset"))
  770. /* 770: */ {
  771. /* 771: 789 */ if (split[1].equalsIgnoreCase("all"))
  772. /* 772: */ {
  773. /* 773: 790 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().settingsResetInProgress);
  774. /* 774: 791 */ this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, new Runnable()
  775. /* 775: */ {
  776. /* 776: */ public void run()
  777. /* 777: */ {
  778. /* 778: 795 */ for (Island island : AdminCmd.this.plugin.getGrid().getOwnedIslands().values()) {
  779. /* 779: 796 */ island.setDefaults();
  780. /* 780: */ }
  781. /* 781: 798 */ for (Island island : AdminCmd.this.plugin.getGrid().getUnownedIslands().values()) {
  782. /* 782: 799 */ island.setDefaults();
  783. /* 783: */ }
  784. /* 784: 801 */ sender.sendMessage(ChatColor.GREEN + AdminCmd.this.plugin.myLocale().settingsResetDone);
  785. /* 785: 802 */ AdminCmd.this.plugin.getGrid().saveGrid();
  786. /* 786: */ }
  787. /* 787: 803 */ });
  788. /* 788: 804 */ return true;
  789. /* 789: */ }
  790. /* 790: 807 */ for (Island.Flags flag : Island.Flags.values()) {
  791. /* 791: 808 */ if (split[1].equalsIgnoreCase(flag.toString()))
  792. /* 792: */ {
  793. /* 793: 809 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().settingsResetInProgress);
  794. /* 794: 810 */ final Island.Flags flagToSet = flag;
  795. /* 795: 811 */ this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, new Runnable()
  796. /* 796: */ {
  797. /* 797: */ public void run()
  798. /* 798: */ {
  799. /* 799: 815 */ for (Island island : AdminCmd.this.plugin.getGrid().getOwnedIslands().values()) {
  800. /* 800: 816 */ island.setIgsFlag(flagToSet, ((Boolean)Settings.defaultIslandSettings.get(flagToSet)).booleanValue());
  801. /* 801: */ }
  802. /* 802: 818 */ for (Island island : AdminCmd.this.plugin.getGrid().getUnownedIslands().values()) {
  803. /* 803: 819 */ island.setIgsFlag(flagToSet, ((Boolean)Settings.defaultIslandSettings.get(flagToSet)).booleanValue());
  804. /* 804: */ }
  805. /* 805: 821 */ sender.sendMessage(ChatColor.GREEN + AdminCmd.this.plugin.myLocale().settingsResetDone);
  806. /* 806: 822 */ AdminCmd.this.plugin.getGrid().saveGrid();
  807. /* 807: */ }
  808. /* 808: 823 */ });
  809. /* 809: 824 */ return true;
  810. /* 810: */ }
  811. /* 811: */ }
  812. /* 812: 828 */ sender.sendMessage(ChatColor.YELLOW + "/" + label + " settingsreset [help | all | flag]:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpSettingsReset);
  813. /* 813: 829 */ sender.sendMessage(ChatColor.GREEN + "flag options: ");
  814. /* 814: 830 */ String commaList = "all";
  815. /* 815: 831 */ for (Island.Flags flag : Island.Flags.values()) {
  816. /* 816: 832 */ commaList = commaList + ", " + flag.toString();
  817. /* 817: */ }
  818. /* 818: 834 */ sender.sendMessage(commaList);
  819. /* 819: 835 */ return true;
  820. /* 820: */ }
  821. /* 821: 839 */ if (split[0].equalsIgnoreCase("resetsign"))
  822. /* 822: */ {
  823. /* 823: 841 */ if (!(sender instanceof Player))
  824. /* 824: */ {
  825. /* 825: 842 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUseInGame);
  826. /* 826: 843 */ return true;
  827. /* 827: */ }
  828. /* 828: 845 */ Player p = (Player)sender;
  829. /* 829: 846 */ if ((!VaultHelper.checkPerm(p, "askyblock.mod.signadmin")) && (!p.isOp()))
  830. /* 830: */ {
  831. /* 831: 847 */ p.sendMessage(ChatColor.RED + this.plugin.myLocale(p.getUniqueId()).errorNoPermission);
  832. /* 832: 848 */ return true;
  833. /* 833: */ }
  834. /* 834: 851 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  835. /* 835: 852 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  836. /* 836: */ {
  837. /* 837: 853 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  838. /* 838: */ }
  839. /* 839: */ else
  840. /* 840: */ {
  841. /* 841: 856 */ if ((!this.plugin.getPlayers().hasIsland(playerUUID)) && (!this.plugin.getPlayers().inTeam(playerUUID)))
  842. /* 842: */ {
  843. /* 843: 858 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  844. /* 844: 859 */ return true;
  845. /* 845: */ }
  846. /* 846: 864 */ BlockIterator iter = new BlockIterator(p, 10);
  847. /* 847: 865 */ Block lastBlock = iter.next();
  848. /* 848: */ do
  849. /* 849: */ {
  850. /* 850: 866 */ if (!iter.hasNext()) {
  851. /* 851: */ break;
  852. /* 852: */ }
  853. /* 853: 867 */ lastBlock = iter.next();
  854. /* 854: 868 */ } while (lastBlock.getType() == Material.AIR);
  855. /* 855: 873 */ if (!lastBlock.getType().equals(Material.SIGN_POST))
  856. /* 856: */ {
  857. /* 857: 874 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale(p.getUniqueId()).adminResetSignNoSign);
  858. /* 858: 875 */ return true;
  859. /* 859: */ }
  860. /* 860: 877 */ Sign sign = (Sign)lastBlock.getState();
  861. /* 861: */
  862. /* 862: 879 */ Location islandLoc = this.plugin.getPlayers().getIslandLocation(playerUUID);
  863. /* 863: 880 */ if (!this.plugin.getGrid().getIslandAt(islandLoc).inIslandSpace(sign.getLocation()))
  864. /* 864: */ {
  865. /* 865: 881 */ p.sendMessage(ChatColor.RED + this.plugin.myLocale(p.getUniqueId()).adminSetHomeNotOnPlayersIsland);
  866. /* 866: */ }
  867. /* 867: */ else
  868. /* 868: */ {
  869. /* 869: 883 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale(p.getUniqueId()).adminResetSignFound);
  870. /* 870: 885 */ if (this.plugin.getWarpSignsListener().addWarp(playerUUID, lastBlock.getLocation()))
  871. /* 871: */ {
  872. /* 872: 887 */ sign.setLine(0, ChatColor.GREEN + this.plugin.myLocale().warpswelcomeLine);
  873. /* 873: 888 */ sign.update();
  874. /* 874: 889 */ p.sendMessage(ChatColor.GREEN + this.plugin.myLocale(p.getUniqueId()).adminResetSignRescued.replace("[name]", this.plugin.getPlayers().getName(playerUUID)));
  875. /* 875: 890 */ return true;
  876. /* 876: */ }
  877. /* 877: 893 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale(p.getUniqueId()).adminResetSignErrorExists.replace("[name]", this.plugin.getWarpSignsListener().getWarpOwner(lastBlock.getLocation())));
  878. /* 878: */ }
  879. /* 879: */ }
  880. /* 880: 896 */ return true;
  881. /* 881: */ }
  882. /* 882: 899 */ if (split[0].equalsIgnoreCase("deleteisland"))
  883. /* 883: */ {
  884. /* 884: 900 */ if (!split[1].equalsIgnoreCase("confirm"))
  885. /* 885: */ {
  886. /* 886: 901 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminDeleteIslandError);
  887. /* 887: 902 */ return true;
  888. /* 888: */ }
  889. /* 889: 905 */ Island island = this.plugin.getGrid().getIslandAt(((Player)sender).getLocation());
  890. /* 890: 906 */ if (island == null)
  891. /* 891: */ {
  892. /* 892: 907 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminDeleteIslandnoid);
  893. /* 893: 908 */ return true;
  894. /* 894: */ }
  895. /* 895: 911 */ UUID owner = island.getOwner();
  896. /* 896: 912 */ String name = "unknown";
  897. /* 897: 913 */ if (owner != null)
  898. /* 898: */ {
  899. /* 899: 914 */ name = this.plugin.getPlayers().getName(owner);
  900. /* 900: 915 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetSpawnownedBy.replace("[name]", name));
  901. /* 901: 916 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminDeleteIslanduse.replace("[name]", name));
  902. /* 902: 917 */ return true;
  903. /* 903: */ }
  904. /* 904: 919 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().deleteremoving.replace("[name]", name));
  905. /* 905: 920 */ deleteIslands(island, sender);
  906. /* 906: 921 */ return true;
  907. /* 907: */ }
  908. /* 908: 923 */ if (split[0].equalsIgnoreCase("resetname"))
  909. /* 909: */ {
  910. /* 910: 925 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  911. /* 911: 926 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  912. /* 912: */ {
  913. /* 913: 927 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  914. /* 914: */ }
  915. /* 915: */ else
  916. /* 916: */ {
  917. /* 917: 930 */ if ((!this.plugin.getPlayers().hasIsland(playerUUID)) && (!this.plugin.getPlayers().inTeam(playerUUID)))
  918. /* 918: */ {
  919. /* 919: 932 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  920. /* 920: 933 */ return true;
  921. /* 921: */ }
  922. /* 922: 936 */ this.plugin.getGrid().setIslandName(playerUUID, null);
  923. /* 923: 937 */ sender.sendMessage(this.plugin.myLocale().generalSuccess);
  924. /* 924: */ }
  925. /* 925: 939 */ return true;
  926. /* 926: */ }
  927. /* 927: 940 */ if (split[0].equalsIgnoreCase("resethome"))
  928. /* 928: */ {
  929. /* 929: 942 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  930. /* 930: 943 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  931. /* 931: */ {
  932. /* 932: 944 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  933. /* 933: */ }
  934. /* 934: */ else
  935. /* 935: */ {
  936. /* 936: 947 */ if ((!this.plugin.getPlayers().hasIsland(playerUUID)) && (!this.plugin.getPlayers().inTeam(playerUUID)))
  937. /* 937: */ {
  938. /* 938: 949 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  939. /* 939: 950 */ return true;
  940. /* 940: */ }
  941. /* 941: 953 */ Location safeHome = this.plugin.getGrid().getSafeHomeLocation(playerUUID, 1);
  942. /* 942: 954 */ if (safeHome == null)
  943. /* 943: */ {
  944. /* 944: 955 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetHomeNoneFound);
  945. /* 945: */ }
  946. /* 946: */ else
  947. /* 947: */ {
  948. /* 948: 957 */ this.plugin.getPlayers().setHomeLocation(playerUUID, safeHome);
  949. /* 949: 958 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminSetHomeHomeSet.replace("[location]", new StringBuilder().append(safeHome.getBlockX()).append(", ").append(safeHome.getBlockY()).append(",").append(safeHome.getBlockZ()).toString()));
  950. /* 950: */ }
  951. /* 951: */ }
  952. /* 952: 961 */ return true;
  953. /* 953: */ }
  954. /* 954: 962 */ if (split[0].equalsIgnoreCase("sethome"))
  955. /* 955: */ {
  956. /* 956: 963 */ if (!(sender instanceof Player))
  957. /* 957: */ {
  958. /* 958: 964 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminLockerrorInGame);
  959. /* 959: 965 */ return true;
  960. /* 960: */ }
  961. /* 961: 967 */ Player player = (Player)sender;
  962. /* 962: */
  963. /* 963: 969 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  964. /* 964: 970 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  965. /* 965: */ {
  966. /* 966: 971 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  967. /* 967: */ }
  968. /* 968: */ else
  969. /* 969: */ {
  970. /* 970: 974 */ if ((!this.plugin.getPlayers().hasIsland(playerUUID)) && (!this.plugin.getPlayers().inTeam(playerUUID)))
  971. /* 971: */ {
  972. /* 972: 976 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorNoIslandOther);
  973. /* 973: 977 */ return true;
  974. /* 974: */ }
  975. /* 975: 980 */ Location islandLoc = this.plugin.getPlayers().getIslandLocation(playerUUID);
  976. /* 976: 982 */ if (!this.plugin.getGrid().getIslandAt(islandLoc).inIslandSpace(player.getLocation()))
  977. /* 977: */ {
  978. /* 978: 983 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).adminSetHomeNotOnPlayersIsland);
  979. /* 979: */ }
  980. /* 980: 986 */ else if (!GridManager.isSafeLocation(player.getLocation()))
  981. /* 981: */ {
  982. /* 982: 988 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).adminSetHomeNoneFound);
  983. /* 983: */ }
  984. /* 984: */ else
  985. /* 985: */ {
  986. /* 986: 991 */ this.plugin.getPlayers().setHomeLocation(playerUUID, player.getLocation());
  987. /* 987: 992 */ player.sendMessage(ChatColor.GREEN + this.plugin.myLocale(player.getUniqueId()).adminSetHomeHomeSet.replace("[location]", new StringBuilder().append(player.getLocation().getBlockX()).append(", ").append(player.getLocation().getBlockY()).append(",").append(player.getLocation().getBlockZ()).toString()));
  988. /* 988: */ }
  989. /* 989: */ }
  990. /* 990: 996 */ return true;
  991. /* 991: */ }
  992. /* 992: 999 */ if (split[0].equalsIgnoreCase("setrange"))
  993. /* 993: */ {
  994. /* 994:1000 */ if (!(sender instanceof Player))
  995. /* 995: */ {
  996. /* 996:1001 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminLockerrorInGame);
  997. /* 997:1002 */ return true;
  998. /* 998: */ }
  999. /* 999:1004 */ Player player = (Player)sender;
  1000. /* 1000:1005 */ UUID playerUUID = player.getUniqueId();
  1001. /* 1001:1006 */ Island island = this.plugin.getGrid().getIslandAt(player.getLocation());
  1002. /* 1002:1008 */ if (island == null)
  1003. /* 1003: */ {
  1004. /* 1004:1009 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNotOnIsland);
  1005. /* 1005:1010 */ return true;
  1006. /* 1006: */ }
  1007. /* 1007:1012 */ int newRange = 10;
  1008. /* 1008:1013 */ int maxRange = Settings.islandDistance;
  1009. /* 1009:1015 */ if (island.isSpawn())
  1010. /* 1010: */ {
  1011. /* 1011: */ try
  1012. /* 1012: */ {
  1013. /* 1013:1017 */ newRange = Integer.valueOf(split[1]).intValue();
  1014. /* 1014: */ }
  1015. /* 1015: */ catch (Exception e)
  1016. /* 1016: */ {
  1017. /* 1017:1019 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeInvalid);
  1018. /* 1018:1020 */ return true;
  1019. /* 1019: */ }
  1020. /* 1020:1022 */ player.sendMessage(ChatColor.GREEN + this.plugin.myLocale(playerUUID).adminSetRangeSet.replace("[number]", String.valueOf(newRange)));
  1021. /* 1021:1023 */ if (newRange > maxRange)
  1022. /* 1022: */ {
  1023. /* 1023:1024 */ player.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + this.plugin.myLocale(playerUUID).adminSetRangeWarning.replace("[max]", String.valueOf(maxRange)));
  1024. /* 1024:1025 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeWarning2);
  1025. /* 1025: */ }
  1026. /* 1026:1027 */ island.setProtectionSize(newRange);
  1027. /* 1027:1028 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncenter.replace("[location]", new StringBuilder().append(island.getCenter().getBlockX()).append(",").append(island.getCenter().getBlockZ()).toString()));
  1028. /* 1028:1029 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnlimits.replace("[min]", new StringBuilder().append(island.getMinX()).append(",").append(island.getMinZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinX() + island.getIslandDistance() - 1).append(",").append(island.getMinZ() + island.getIslandDistance() - 1).toString()));
  1029. /* 1029: */
  1030. /* 1030:1031 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnrange.replace("[number]", String.valueOf(island.getProtectionSize())));
  1031. /* 1031:1032 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncoords.replace("[min]", new StringBuilder().append(island.getMinProtectedX()).append(", ").append(island.getMinProtectedZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinProtectedX() + island.getProtectionSize() - 1).append(", ").append(island.getMinProtectedZ() + island.getProtectionSize() - 1).toString()));
  1032. /* 1032:1035 */ if (island.isLocked()) {
  1033. /* 1033:1036 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetSpawnlocked);
  1034. /* 1034: */ }
  1035. /* 1035: */ }
  1036. /* 1036: */ else
  1037. /* 1037: */ {
  1038. /* 1038:1039 */ if (!this.plugin.getConfig().getBoolean("island.overridelimit")) {
  1039. /* 1039:1040 */ maxRange -= 16;
  1040. /* 1040: */ }
  1041. /* 1041: */ try
  1042. /* 1042: */ {
  1043. /* 1043:1043 */ newRange = Integer.valueOf(split[1]).intValue();
  1044. /* 1044: */ }
  1045. /* 1045: */ catch (Exception e)
  1046. /* 1046: */ {
  1047. /* 1047:1045 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeInvalid + " " + this.plugin.myLocale(playerUUID).adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1048. /* 1048:1046 */ return true;
  1049. /* 1049: */ }
  1050. /* 1050:1048 */ if ((newRange < 10) || (newRange > maxRange))
  1051. /* 1051: */ {
  1052. /* 1052:1049 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeInvalid + " " + this.plugin.myLocale(playerUUID).adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1053. /* 1053:1050 */ return true;
  1054. /* 1054: */ }
  1055. /* 1055:1052 */ island.setProtectionSize(newRange);
  1056. /* 1056:1053 */ player.sendMessage(ChatColor.GREEN + this.plugin.myLocale(playerUUID).adminSetRangeSet.replace("[number]", String.valueOf(newRange)));
  1057. /* 1057:1054 */ showInfo(island.getOwner(), sender);
  1058. /* 1058: */ }
  1059. /* 1059:1056 */ return true;
  1060. /* 1060: */ }
  1061. /* 1061:1060 */ if (split[0].equalsIgnoreCase("addrange"))
  1062. /* 1062: */ {
  1063. /* 1063:1061 */ if (!(sender instanceof Player))
  1064. /* 1064: */ {
  1065. /* 1065:1062 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminLockerrorInGame);
  1066. /* 1066:1063 */ return true;
  1067. /* 1067: */ }
  1068. /* 1068:1065 */ Player player = (Player)sender;
  1069. /* 1069:1066 */ UUID playerUUID = player.getUniqueId();
  1070. /* 1070:1067 */ Island island = this.plugin.getGrid().getIslandAt(player.getLocation());
  1071. /* 1071:1069 */ if (island == null)
  1072. /* 1072: */ {
  1073. /* 1073:1070 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNotOnIsland);
  1074. /* 1074:1071 */ return true;
  1075. /* 1075: */ }
  1076. /* 1076:1073 */ int newRange = island.getProtectionSize();
  1077. /* 1077:1074 */ int maxRange = Settings.islandDistance;
  1078. /* 1078:1076 */ if (island.isSpawn())
  1079. /* 1079: */ {
  1080. /* 1080: */ try
  1081. /* 1081: */ {
  1082. /* 1082:1078 */ newRange = Integer.valueOf(split[1]).intValue() + island.getProtectionSize();
  1083. /* 1083: */ }
  1084. /* 1084: */ catch (Exception e)
  1085. /* 1085: */ {
  1086. /* 1086:1080 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeInvalid);
  1087. /* 1087:1081 */ return true;
  1088. /* 1088: */ }
  1089. /* 1089:1083 */ player.sendMessage(ChatColor.GREEN + this.plugin.myLocale(playerUUID).adminSetRangeSet.replace("[number]", String.valueOf(newRange)));
  1090. /* 1090:1084 */ if (newRange > maxRange)
  1091. /* 1091: */ {
  1092. /* 1092:1085 */ player.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + this.plugin.myLocale(playerUUID).adminSetRangeWarning.replace("[max]", String.valueOf(maxRange)));
  1093. /* 1093: */
  1094. /* 1094:1087 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeWarning2);
  1095. /* 1095: */ }
  1096. /* 1096:1089 */ island.setProtectionSize(newRange);
  1097. /* 1097:1090 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncenter.replace("[location]", new StringBuilder().append(island.getCenter().getBlockX()).append(",").append(island.getCenter().getBlockZ()).toString()));
  1098. /* 1098:1091 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnlimits.replace("[min]", new StringBuilder().append(island.getMinX()).append(",").append(island.getMinZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinX() + island.getIslandDistance() - 1).append(",").append(island.getMinZ() + island.getIslandDistance() - 1).toString()));
  1099. /* 1099: */
  1100. /* 1100:1093 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnrange.replace("[number]", String.valueOf(island.getProtectionSize())));
  1101. /* 1101:1094 */ player.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncoords.replace("[min]", new StringBuilder().append(island.getMinProtectedX()).append(", ").append(island.getMinProtectedZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinProtectedX() + island.getProtectionSize() - 1).append(", ").append(island.getMinProtectedZ() + island.getProtectionSize() - 1).toString()));
  1102. /* 1102:1097 */ if (island.isLocked()) {
  1103. /* 1103:1098 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetSpawnlocked);
  1104. /* 1104: */ }
  1105. /* 1105: */ }
  1106. /* 1106: */ else
  1107. /* 1107: */ {
  1108. /* 1108:1101 */ if (!this.plugin.getConfig().getBoolean("island.overridelimit")) {
  1109. /* 1109:1102 */ maxRange -= 16;
  1110. /* 1110: */ }
  1111. /* 1111: */ try
  1112. /* 1112: */ {
  1113. /* 1113:1105 */ newRange = Integer.valueOf(split[1]).intValue() + island.getProtectionSize();
  1114. /* 1114: */ }
  1115. /* 1115: */ catch (Exception e)
  1116. /* 1116: */ {
  1117. /* 1117:1107 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeInvalid + " " + this.plugin.myLocale(playerUUID).adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1118. /* 1118:1108 */ return true;
  1119. /* 1119: */ }
  1120. /* 1120:1110 */ if ((newRange < 10) || (newRange > maxRange))
  1121. /* 1121: */ {
  1122. /* 1122:1111 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(playerUUID).adminSetRangeInvalid + " " + this.plugin.myLocale(playerUUID).adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1123. /* 1123:1112 */ return true;
  1124. /* 1124: */ }
  1125. /* 1125:1114 */ island.setProtectionSize(newRange);
  1126. /* 1126:1115 */ player.sendMessage(ChatColor.GREEN + this.plugin.myLocale(playerUUID).adminSetRangeSet.replace("[number]", String.valueOf(newRange)));
  1127. /* 1127:1116 */ showInfo(island.getOwner(), sender);
  1128. /* 1128: */ }
  1129. /* 1129:1118 */ return true;
  1130. /* 1130: */ }
  1131. /* 1131:1121 */ if (split[0].equalsIgnoreCase("purge"))
  1132. /* 1132: */ {
  1133. /* 1133:1125 */ if ((split[1].equalsIgnoreCase("allow")) || (split[1].equalsIgnoreCase("disallow")))
  1134. /* 1134: */ {
  1135. /* 1135:1127 */ if (!(sender instanceof Player))
  1136. /* 1136: */ {
  1137. /* 1137:1128 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminLockerrorInGame);
  1138. /* 1138:1129 */ return true;
  1139. /* 1139: */ }
  1140. /* 1140:1131 */ Player p = (Player)sender;
  1141. /* 1141:1133 */ if ((!p.getLocation().getWorld().equals(ASkyBlock.getIslandWorld())) && (!p.getLocation().getWorld().equals(ASkyBlock.getNetherWorld())))
  1142. /* 1142: */ {
  1143. /* 1143:1134 */ p.sendMessage(ChatColor.RED + this.plugin.myLocale(p.getUniqueId()).errorWrongWorld);
  1144. /* 1144:1135 */ return true;
  1145. /* 1145: */ }
  1146. /* 1146:1137 */ Island island = this.plugin.getGrid().getIslandAt(p.getLocation());
  1147. /* 1147:1138 */ if (island == null)
  1148. /* 1148: */ {
  1149. /* 1149:1139 */ p.sendMessage(ChatColor.RED + this.plugin.myLocale(p.getUniqueId()).errorNoIslandOther);
  1150. /* 1150:1140 */ return true;
  1151. /* 1151: */ }
  1152. /* 1152:1142 */ if (split[1].equalsIgnoreCase("allow")) {
  1153. /* 1153:1143 */ island.setPurgeProtected(true);
  1154. /* 1154: */ } else {
  1155. /* 1155:1145 */ island.setPurgeProtected(false);
  1156. /* 1156: */ }
  1157. /* 1157:1147 */ if (island.isPurgeProtected()) {
  1158. /* 1158:1148 */ p.sendMessage(ChatColor.GREEN + this.plugin.myLocale(p.getUniqueId()).adminAllowPurge);
  1159. /* 1159: */ } else {
  1160. /* 1160:1150 */ p.sendMessage(ChatColor.GREEN + this.plugin.myLocale(p.getUniqueId()).adminPreventPurge);
  1161. /* 1161: */ }
  1162. /* 1162:1152 */ return true;
  1163. /* 1163: */ }
  1164. /* 1164:1157 */ if (this.purgeFlag)
  1165. /* 1165: */ {
  1166. /* 1166:1158 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().purgealreadyRunning);
  1167. /* 1167:1159 */ return true;
  1168. /* 1168: */ }
  1169. /* 1169:1162 */ if (split[1].equalsIgnoreCase("unowned"))
  1170. /* 1170: */ {
  1171. /* 1171:1163 */ countUnowned(sender);
  1172. /* 1172:1164 */ return true;
  1173. /* 1173: */ }
  1174. /* 1174:1167 */ this.purgeFlag = true;
  1175. /* 1175: */ int time;
  1176. /* 1176: */ try
  1177. /* 1177: */ {
  1178. /* 1178:1173 */ time = Integer.parseInt(split[1]) * 24;
  1179. /* 1179: */ }
  1180. /* 1180: */ catch (Exception e)
  1181. /* 1181: */ {
  1182. /* 1182:1175 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().purgeusage.replace("[label]", label));
  1183. /* 1183:1176 */ this.purgeFlag = false;
  1184. /* 1184:1177 */ return true;
  1185. /* 1185: */ }
  1186. /* 1186:1179 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().purgecalculating.replace("[time]", split[1]));
  1187. /* 1187:1181 */ for (Map.Entry<UUID, Island> entry : this.plugin.getGrid().getOwnershipMap().entrySet()) {
  1188. /* 1188:1184 */ if ((entry.getKey() != null) && (!((Island)entry.getValue()).isPurgeProtected())) {
  1189. /* 1189:1185 */ if (Bukkit.getOfflinePlayer((UUID)entry.getKey()).hasPlayedBefore())
  1190. /* 1190: */ {
  1191. /* 1191:1186 */ long offlineTime = Bukkit.getOfflinePlayer((UUID)entry.getKey()).getLastPlayed();
  1192. /* 1192:1187 */ offlineTime = (System.currentTimeMillis() - offlineTime) / 3600000L;
  1193. /* 1193:1188 */ if (offlineTime > time) {
  1194. /* 1194:1191 */ this.removeList.add(entry.getKey());
  1195. /* 1195: */ }
  1196. /* 1196: */ }
  1197. /* 1197: */ else
  1198. /* 1198: */ {
  1199. /* 1199:1195 */ this.removeList.add(entry.getKey());
  1200. /* 1200: */ }
  1201. /* 1201: */ }
  1202. /* 1202: */ }
  1203. /* 1203:1199 */ if (this.removeList.isEmpty())
  1204. /* 1204: */ {
  1205. /* 1205:1200 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().purgenoneFound);
  1206. /* 1206:1201 */ this.purgeFlag = false;
  1207. /* 1207:1202 */ return true;
  1208. /* 1208: */ }
  1209. /* 1209:1204 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().purgethisWillRemove.replace("[number]", String.valueOf(this.removeList.size())).replace("[level]", String.valueOf(Settings.abandonedIslandLevel)));
  1210. /* 1210:1205 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().purgewarning);
  1211. /* 1211:1206 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().purgetypeConfirm.replace("[label]", label));
  1212. /* 1212:1207 */ this.confirmReq = true;
  1213. /* 1213:1208 */ this.confirmOK = false;
  1214. /* 1214:1209 */ this.confirmTimer = 0;
  1215. /* 1215:1210 */ new BukkitRunnable()
  1216. /* 1216: */ {
  1217. /* 1217: */ public void run()
  1218. /* 1218: */ {
  1219. /* 1219:1216 */ if (AdminCmd.access$208(AdminCmd.this) > 10)
  1220. /* 1220: */ {
  1221. /* 1221:1218 */ AdminCmd.this.confirmReq = false;
  1222. /* 1222:1219 */ AdminCmd.this.confirmOK = false;
  1223. /* 1223:1220 */ AdminCmd.this.purgeFlag = false;
  1224. /* 1224:1221 */ AdminCmd.this.removeList.clear();
  1225. /* 1225:1222 */ sender.sendMessage(ChatColor.YELLOW + AdminCmd.this.plugin.myLocale().purgepurgeCancelled);
  1226. /* 1226:1223 */ cancel();
  1227. /* 1227: */ }
  1228. /* 1228:1224 */ else if (AdminCmd.this.confirmOK)
  1229. /* 1229: */ {
  1230. /* 1230:1229 */ final int total = AdminCmd.this.removeList.size();
  1231. /* 1231:1230 */ new BukkitRunnable()
  1232. /* 1232: */ {
  1233. /* 1233: */ public void run()
  1234. /* 1234: */ {
  1235. /* 1235:1233 */ if ((AdminCmd.this.removeList.isEmpty()) && (AdminCmd.this.purgeFlag))
  1236. /* 1236: */ {
  1237. /* 1237:1234 */ AdminCmd.this.purgeFlag = false;
  1238. /* 1238:1235 */ AdminCmd.5.this.val$sender.sendMessage(ChatColor.YELLOW + AdminCmd.this.plugin.myLocale().purgefinished);
  1239. /* 1239:1236 */ cancel();
  1240. /* 1240: */ }
  1241. /* 1241:1239 */ if ((AdminCmd.this.removeList.size() > 0) && (AdminCmd.this.purgeFlag))
  1242. /* 1242: */ {
  1243. /* 1243:1241 */ if (AdminCmd.this.plugin.getServer().getPlayer((UUID)AdminCmd.this.removeList.get(0)) == null)
  1244. /* 1244: */ {
  1245. /* 1245:1244 */ if (AdminCmd.this.plugin.getPlayers().getIslandLevel((UUID)AdminCmd.this.removeList.get(0)).intValue() < Settings.abandonedIslandLevel)
  1246. /* 1246: */ {
  1247. /* 1247:1245 */ AdminCmd.5.this.val$sender.sendMessage(ChatColor.YELLOW + "[" + (total - AdminCmd.this.removeList.size() + 1) + "/" + total + "] " + AdminCmd.this.plugin.myLocale().purgeremovingName.replace("[name]", AdminCmd.this.plugin.getPlayers().getName((UUID)AdminCmd.this.removeList.get(0))));
  1248. /* 1248: */
  1249. /* 1249:1247 */ AdminCmd.this.plugin.deletePlayerIsland((UUID)AdminCmd.this.removeList.get(0), true);
  1250. /* 1250: */ }
  1251. /* 1251: */ }
  1252. /* 1252: */ else {
  1253. /* 1253:1250 */ AdminCmd.5.this.val$sender.sendMessage(ChatColor.YELLOW + "[" + (total - AdminCmd.this.removeList.size() + 1) + "/" + total + "] " + "Skipping online player...");
  1254. /* 1254: */ }
  1255. /* 1255:1253 */ AdminCmd.this.removeList.remove(0);
  1256. /* 1256: */ }
  1257. /* 1257: */ }
  1258. /* 1258:1253 */ }.runTaskTimer(AdminCmd.this.plugin, 0L, 20L);
  1259. /* 1259: */
  1260. /* 1260: */
  1261. /* 1261: */
  1262. /* 1262: */
  1263. /* 1263:1258 */ AdminCmd.this.confirmReq = false;
  1264. /* 1264:1259 */ AdminCmd.this.confirmOK = false;
  1265. /* 1265:1260 */ cancel();
  1266. /* 1266: */ }
  1267. /* 1267: */ }
  1268. /* 1268:1260 */ }.runTaskTimer(this.plugin, 0L, 40L);
  1269. /* 1269: */
  1270. /* 1270: */
  1271. /* 1271: */
  1272. /* 1272:1264 */ return true;
  1273. /* 1273: */ }
  1274. /* 1274:1265 */ if (split[0].equalsIgnoreCase("lock"))
  1275. /* 1275: */ {
  1276. /* 1276:1267 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1277. /* 1277:1268 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1278. /* 1278: */ {
  1279. /* 1279:1269 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1280. /* 1280:1270 */ return true;
  1281. /* 1281: */ }
  1282. /* 1282:1272 */ Island island = this.plugin.getGrid().getIsland(playerUUID);
  1283. /* 1283:1273 */ if (island != null)
  1284. /* 1284: */ {
  1285. /* 1285:1274 */ Player owner = this.plugin.getServer().getPlayer(island.getOwner());
  1286. /* 1286:1275 */ if (island.isLocked())
  1287. /* 1287: */ {
  1288. /* 1288:1276 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().lockUnlocking);
  1289. /* 1289:1277 */ island.setLocked(false);
  1290. /* 1290:1278 */ if (owner != null) {
  1291. /* 1291:1279 */ owner.sendMessage(this.plugin.myLocale(owner.getUniqueId()).adminLockadminUnlockedIsland);
  1292. /* 1292: */ } else {
  1293. /* 1293:1281 */ this.plugin.getMessages().setMessage(island.getOwner(), this.plugin.myLocale(island.getOwner()).adminLockadminUnlockedIsland);
  1294. /* 1294: */ }
  1295. /* 1295: */ }
  1296. /* 1296: */ else
  1297. /* 1297: */ {
  1298. /* 1298:1284 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().lockLocking);
  1299. /* 1299:1285 */ island.setLocked(true);
  1300. /* 1300:1286 */ if (owner != null) {
  1301. /* 1301:1287 */ owner.sendMessage(this.plugin.myLocale(owner.getUniqueId()).adminLockadminLockedIsland);
  1302. /* 1302: */ } else {
  1303. /* 1303:1289 */ this.plugin.getMessages().setMessage(island.getOwner(), this.plugin.myLocale(island.getOwner()).adminLockadminLockedIsland);
  1304. /* 1304: */ }
  1305. /* 1305: */ }
  1306. /* 1306: */ }
  1307. /* 1307: */ else
  1308. /* 1308: */ {
  1309. /* 1309:1293 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  1310. /* 1310: */ }
  1311. /* 1311:1295 */ return true;
  1312. /* 1312: */ }
  1313. /* 1313:1297 */ if (split[0].equalsIgnoreCase("setdeaths"))
  1314. /* 1314: */ {
  1315. /* 1315:1299 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1316. /* 1316:1300 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1317. /* 1317: */ {
  1318. /* 1318:1301 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1319. /* 1319:1302 */ return true;
  1320. /* 1320: */ }
  1321. /* 1321:1304 */ sender.sendMessage(ChatColor.GREEN + this.plugin.getPlayers().getName(playerUUID) + " " + this.plugin.getPlayers().getDeaths(playerUUID) + " " + this.plugin.myLocale().deaths);
  1322. /* 1322:1305 */ sender.sendMessage(ChatColor.YELLOW + label + " setdeaths <player> <number>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpsetDeaths);
  1323. /* 1323:1306 */ return true;
  1324. /* 1324: */ }
  1325. /* 1325:1308 */ if (split[0].equalsIgnoreCase("clearreset"))
  1326. /* 1326: */ {
  1327. /* 1327:1310 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1328. /* 1328:1311 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1329. /* 1329: */ {
  1330. /* 1330:1312 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1331. /* 1331:1313 */ return true;
  1332. /* 1332: */ }
  1333. /* 1333:1315 */ this.plugin.getPlayers().setResetsLeft(playerUUID, Settings.resetLimit);
  1334. /* 1334:1316 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().clearedResetLimit + " [" + Settings.resetLimit + "]");
  1335. /* 1335:1317 */ return true;
  1336. /* 1336: */ }
  1337. /* 1337:1319 */ if (split[0].equalsIgnoreCase("tp"))
  1338. /* 1338: */ {
  1339. /* 1339:1320 */ if (!(sender instanceof Player))
  1340. /* 1340: */ {
  1341. /* 1341:1321 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownCommand);
  1342. /* 1342:1322 */ return true;
  1343. /* 1343: */ }
  1344. /* 1344:1324 */ Player player = (Player)sender;
  1345. /* 1345: */
  1346. /* 1346:1326 */ UUID targetUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1347. /* 1347:1327 */ if (!this.plugin.getPlayers().isAKnownPlayer(targetUUID))
  1348. /* 1348: */ {
  1349. /* 1349:1328 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
  1350. /* 1350:1329 */ return true;
  1351. /* 1351: */ }
  1352. /* 1352:1331 */ if ((this.plugin.getPlayers().hasIsland(targetUUID)) || (this.plugin.getPlayers().inTeam(targetUUID)))
  1353. /* 1353: */ {
  1354. /* 1354:1333 */ Location warpSpot = this.plugin.getPlayers().getIslandLocation(targetUUID).toVector().toLocation(ASkyBlock.getIslandWorld());
  1355. /* 1355:1334 */ String failureMessage = ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).adminTpManualWarp.replace("[location]", new StringBuilder().append(warpSpot.getBlockX()).append(" ").append(warpSpot.getBlockY()).append(" ").append(warpSpot.getBlockZ()).toString());
  1356. /* 1356: */
  1357. /* 1357: */
  1358. /* 1358:1337 */ Location home = this.plugin.getPlayers().getHomeLocation(targetUUID);
  1359. /* 1359:1338 */ this.plugin.getGrid();
  1360. /* 1360:1339 */ if ((home != null) && (home.getWorld().equals(ASkyBlock.getIslandWorld())) && (GridManager.isSafeLocation(home)))
  1361. /* 1361: */ {
  1362. /* 1362:1340 */ player.teleport(home);
  1363. /* 1363:1341 */ return true;
  1364. /* 1364: */ }
  1365. /* 1365:1344 */ new SafeSpotTeleport(this.plugin, player, warpSpot, failureMessage);
  1366. /* 1366:1345 */ return true;
  1367. /* 1367: */ }
  1368. /* 1368:1347 */ sender.sendMessage(this.plugin.myLocale().errorNoIslandOther);
  1369. /* 1369:1348 */ return true;
  1370. /* 1370: */ }
  1371. /* 1371:1350 */ if (split[0].equalsIgnoreCase("tpnether"))
  1372. /* 1372: */ {
  1373. /* 1373:1351 */ if ((!Settings.createNether) || (!Settings.newNether) || (ASkyBlock.getNetherWorld() == null)) {
  1374. /* 1374:1352 */ return false;
  1375. /* 1375: */ }
  1376. /* 1376:1354 */ if (!(sender instanceof Player))
  1377. /* 1377: */ {
  1378. /* 1378:1355 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownCommand);
  1379. /* 1379:1356 */ return true;
  1380. /* 1380: */ }
  1381. /* 1381:1358 */ Player player = (Player)sender;
  1382. /* 1382: */
  1383. /* 1383:1360 */ UUID targetUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1384. /* 1384:1361 */ if (!this.plugin.getPlayers().isAKnownPlayer(targetUUID))
  1385. /* 1385: */ {
  1386. /* 1386:1362 */ player.sendMessage(ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).errorUnknownPlayer);
  1387. /* 1387:1363 */ return true;
  1388. /* 1388: */ }
  1389. /* 1389:1365 */ if ((this.plugin.getPlayers().hasIsland(targetUUID)) || (this.plugin.getPlayers().inTeam(targetUUID)))
  1390. /* 1390: */ {
  1391. /* 1391:1367 */ Location warpSpot = this.plugin.getPlayers().getIslandLocation(targetUUID).toVector().toLocation(ASkyBlock.getNetherWorld());
  1392. /* 1392:1368 */ String failureMessage = ChatColor.RED + this.plugin.myLocale(player.getUniqueId()).adminTpManualWarp.replace("[location]", new StringBuilder().append(warpSpot.getBlockX()).append(" ").append(warpSpot.getBlockY()).append(" ").append(warpSpot.getBlockZ()).toString());
  1393. /* 1393: */
  1394. /* 1394: */
  1395. /* 1395:1371 */ Location home = this.plugin.getPlayers().getHomeLocation(targetUUID);
  1396. /* 1396:1372 */ this.plugin.getGrid();
  1397. /* 1397:1373 */ if ((home != null) && (home.getWorld().equals(ASkyBlock.getNetherWorld())) && (GridManager.isSafeLocation(home)))
  1398. /* 1398: */ {
  1399. /* 1399:1374 */ player.teleport(home);
  1400. /* 1400:1375 */ return true;
  1401. /* 1401: */ }
  1402. /* 1402:1377 */ new SafeSpotTeleport(this.plugin, player, warpSpot, failureMessage);
  1403. /* 1403:1378 */ return true;
  1404. /* 1404: */ }
  1405. /* 1405:1380 */ sender.sendMessage(this.plugin.myLocale().errorNoIslandOther);
  1406. /* 1406:1381 */ return true;
  1407. /* 1407: */ }
  1408. /* 1408:1383 */ if (split[0].equalsIgnoreCase("delete"))
  1409. /* 1409: */ {
  1410. /* 1410:1385 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1411. /* 1411:1386 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1412. /* 1412: */ {
  1413. /* 1413:1387 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1414. /* 1414:1388 */ return true;
  1415. /* 1415: */ }
  1416. /* 1416:1392 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().deleteremoving.replace("[name]", split[1]));
  1417. /* 1417: */
  1418. /* 1418: */
  1419. /* 1419:1395 */ Player target = this.plugin.getServer().getPlayer(playerUUID);
  1420. /* 1420:1396 */ if (target != null)
  1421. /* 1421: */ {
  1422. /* 1422:1401 */ CoopPlay.getInstance().clearMyInvitedCoops(target);
  1423. /* 1423:1402 */ CoopPlay.getInstance().clearMyCoops(target);
  1424. /* 1424:1403 */ this.plugin.resetPlayer(target);
  1425. /* 1425: */ }
  1426. /* 1426:1406 */ this.plugin.deletePlayerIsland(playerUUID, true);
  1427. /* 1427:1407 */ return true;
  1428. /* 1428: */ }
  1429. /* 1429:1409 */ if (split[0].equalsIgnoreCase("reserve"))
  1430. /* 1430: */ {
  1431. /* 1431:1411 */ if ((sender instanceof Player))
  1432. /* 1432: */ {
  1433. /* 1433:1412 */ Player player = (Player)sender;
  1434. /* 1434: */
  1435. /* 1435:1414 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1436. /* 1436:1415 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1437. /* 1437: */ {
  1438. /* 1438:1416 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1439. /* 1439:1417 */ return true;
  1440. /* 1440: */ }
  1441. /* 1441:1420 */ Location islandLoc = this.plugin.getGrid().getClosestIsland(player.getLocation());
  1442. /* 1442:1421 */ Island island = this.plugin.getGrid().getIslandAt(islandLoc);
  1443. /* 1443:1422 */ if (island == null)
  1444. /* 1444: */ {
  1445. /* 1445:1424 */ this.plugin.getIslandCmd().reserveLocation(playerUUID, islandLoc);
  1446. /* 1446:1425 */ sender.sendMessage(ChatColor.GREEN + " [" + islandLoc.getBlockX() + ", " + islandLoc.getBlockZ() + "] " + this.plugin.myLocale().generalSuccess);
  1447. /* 1447: */ }
  1448. /* 1448: */ else
  1449. /* 1449: */ {
  1450. /* 1450:1427 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminReserveIslandExists);
  1451. /* 1451: */ }
  1452. /* 1452:1429 */ return true;
  1453. /* 1453: */ }
  1454. /* 1454:1432 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownCommand);
  1455. /* 1455: */
  1456. /* 1456:1434 */ return true;
  1457. /* 1457: */ }
  1458. /* 1458:1435 */ if (split[0].equalsIgnoreCase("register"))
  1459. /* 1459: */ {
  1460. /* 1460:1436 */ if ((sender instanceof Player))
  1461. /* 1461: */ {
  1462. /* 1462:1438 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1463. /* 1463:1439 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1464. /* 1464: */ {
  1465. /* 1465:1440 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1466. /* 1466:1441 */ return true;
  1467. /* 1467: */ }
  1468. /* 1468:1443 */ if (adminSetPlayerIsland(sender, ((Player)sender).getLocation(), playerUUID))
  1469. /* 1469: */ {
  1470. /* 1470:1444 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().registersettingIsland.replace("[name]", split[1]));
  1471. /* 1471:1445 */ this.plugin.getGrid().saveGrid();
  1472. /* 1472: */ }
  1473. /* 1473: */ else
  1474. /* 1474: */ {
  1475. /* 1475:1447 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().registererrorBedrockNotFound);
  1476. /* 1476: */ }
  1477. /* 1477:1449 */ return true;
  1478. /* 1478: */ }
  1479. /* 1479:1452 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownCommand);
  1480. /* 1480: */
  1481. /* 1481:1454 */ return true;
  1482. /* 1482: */ }
  1483. /* 1483:1455 */ if (split[0].equalsIgnoreCase("unregister"))
  1484. /* 1484: */ {
  1485. /* 1485:1457 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1486. /* 1486:1458 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1487. /* 1487: */ {
  1488. /* 1488:1459 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1489. /* 1489:1460 */ return true;
  1490. /* 1490: */ }
  1491. /* 1491:1462 */ if (this.plugin.getPlayers().inTeam(playerUUID))
  1492. /* 1492: */ {
  1493. /* 1493:1463 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminUnregisterOnTeam);
  1494. /* 1494:1464 */ return true;
  1495. /* 1495: */ }
  1496. /* 1496:1466 */ Location island = this.plugin.getPlayers().getIslandLocation(playerUUID);
  1497. /* 1497:1467 */ if (island == null)
  1498. /* 1498: */ {
  1499. /* 1499:1468 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  1500. /* 1500:1469 */ return true;
  1501. /* 1501: */ }
  1502. /* 1502:1472 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminUnregisterKeepBlocks.replace("[location]", new StringBuilder().append(this.plugin.getPlayers().getIslandLocation(playerUUID).getBlockX()).append(",").append(this.plugin.getPlayers().getIslandLocation(playerUUID).getBlockZ()).toString()));
  1503. /* 1503: */
  1504. /* 1504: */
  1505. /* 1505:1475 */ this.plugin.deletePlayerIsland(playerUUID, false);
  1506. /* 1506:1476 */ this.plugin.getGrid().saveGrid();
  1507. /* 1507:1477 */ return true;
  1508. /* 1508: */ }
  1509. /* 1509:1479 */ if (split[0].equalsIgnoreCase("info"))
  1510. /* 1510: */ {
  1511. /* 1511:1481 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1512. /* 1512:1484 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1513. /* 1513: */ {
  1514. /* 1514:1485 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1515. /* 1515:1486 */ return true;
  1516. /* 1516: */ }
  1517. /* 1517:1488 */ showInfo(playerUUID, sender);
  1518. /* 1518:1489 */ return true;
  1519. /* 1519: */ }
  1520. /* 1520:1491 */ if (split[0].equalsIgnoreCase("resetallchallenges"))
  1521. /* 1521: */ {
  1522. /* 1522:1493 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1523. /* 1523:1494 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1524. /* 1524: */ {
  1525. /* 1525:1495 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1526. /* 1526:1496 */ return true;
  1527. /* 1527: */ }
  1528. /* 1528:1498 */ this.plugin.getPlayers().resetAllChallenges(playerUUID, true);
  1529. /* 1529:1499 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().resetChallengessuccess.replace("[name]", split[1]));
  1530. /* 1530:1500 */ return true;
  1531. /* 1531: */ }
  1532. /* 1532:1502 */ return false;
  1533. /* 1533: */ case 3:
  1534. /* 1534:1506 */ if (split[0].equalsIgnoreCase("purge"))
  1535. /* 1535: */ {
  1536. /* 1536:1507 */ if (this.purgeFlag)
  1537. /* 1537: */ {
  1538. /* 1538:1508 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().purgealreadyRunning);
  1539. /* 1539:1509 */ return true;
  1540. /* 1540: */ }
  1541. /* 1541:1512 */ if ((split[1].equalsIgnoreCase("unowned")) && (split[2].equalsIgnoreCase("confirm")))
  1542. /* 1542: */ {
  1543. /* 1543:1513 */ if (!this.purgeUnownedConfirm)
  1544. /* 1544: */ {
  1545. /* 1545:1514 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().confirmerrorTimeLimitExpired);
  1546. /* 1546:1515 */ return true;
  1547. /* 1547: */ }
  1548. /* 1548:1517 */ this.purgeUnownedConfirm = false;
  1549. /* 1549: */
  1550. /* 1550:1519 */ purgeUnownedIslands(sender);
  1551. /* 1551:1520 */ return true;
  1552. /* 1552: */ }
  1553. /* 1553: */ }
  1554. /* 1554:1526 */ if (split[0].equalsIgnoreCase("addrange"))
  1555. /* 1555: */ {
  1556. /* 1556:1528 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1557. /* 1557:1530 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1558. /* 1558: */ {
  1559. /* 1559:1531 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1560. /* 1560:1532 */ return true;
  1561. /* 1561: */ }
  1562. /* 1562:1535 */ if (this.plugin.getPlayers().inTeam(playerUUID)) {
  1563. /* 1563:1536 */ playerUUID = this.plugin.getPlayers().getTeamLeader(playerUUID);
  1564. /* 1564: */ }
  1565. /* 1565:1539 */ Island island = this.plugin.getGrid().getIsland(playerUUID);
  1566. /* 1566:1540 */ if (island == null)
  1567. /* 1567: */ {
  1568. /* 1568:1541 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  1569. /* 1569:1542 */ return true;
  1570. /* 1570: */ }
  1571. /* 1571:1544 */ int newRange = 0;
  1572. /* 1572:1545 */ int maxRange = Settings.islandDistance;
  1573. /* 1573:1546 */ if (!this.plugin.getConfig().getBoolean("island.overridelimit")) {
  1574. /* 1574:1547 */ maxRange -= 16;
  1575. /* 1575: */ }
  1576. /* 1576: */ try
  1577. /* 1577: */ {
  1578. /* 1578:1550 */ newRange = Integer.valueOf(split[2]).intValue() + island.getProtectionSize();
  1579. /* 1579: */ }
  1580. /* 1580: */ catch (Exception e)
  1581. /* 1581: */ {
  1582. /* 1582:1552 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetRangeInvalid + " " + this.plugin.myLocale().adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1583. /* 1583: */
  1584. /* 1584:1554 */ return true;
  1585. /* 1585: */ }
  1586. /* 1586:1556 */ if ((newRange < 10) || (newRange > maxRange))
  1587. /* 1587: */ {
  1588. /* 1588:1557 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetRangeInvalid + " " + this.plugin.myLocale().adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1589. /* 1589: */
  1590. /* 1590:1559 */ return true;
  1591. /* 1591: */ }
  1592. /* 1592:1561 */ island.setProtectionSize(newRange);
  1593. /* 1593:1562 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminSetRangeSet.replace("[number]", String.valueOf(newRange)));
  1594. /* 1594:1563 */ showInfo(playerUUID, sender);
  1595. /* 1595:1564 */ this.plugin.getGrid().saveGrid();
  1596. /* 1596:1565 */ return true;
  1597. /* 1597: */ }
  1598. /* 1598:1567 */ if (split[0].equalsIgnoreCase("setrange"))
  1599. /* 1599: */ {
  1600. /* 1600:1569 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1601. /* 1601:1571 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1602. /* 1602: */ {
  1603. /* 1603:1572 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1604. /* 1604:1573 */ return true;
  1605. /* 1605: */ }
  1606. /* 1606:1576 */ if (this.plugin.getPlayers().inTeam(playerUUID)) {
  1607. /* 1607:1577 */ playerUUID = this.plugin.getPlayers().getTeamLeader(playerUUID);
  1608. /* 1608: */ }
  1609. /* 1609:1580 */ Island island = this.plugin.getGrid().getIsland(playerUUID);
  1610. /* 1610:1581 */ if (island == null)
  1611. /* 1611: */ {
  1612. /* 1612:1582 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  1613. /* 1613:1583 */ return true;
  1614. /* 1614: */ }
  1615. /* 1615:1585 */ int newRange = 0;
  1616. /* 1616:1586 */ int maxRange = Settings.islandDistance;
  1617. /* 1617:1587 */ if (!this.plugin.getConfig().getBoolean("island.overridelimit")) {
  1618. /* 1618:1588 */ maxRange -= 16;
  1619. /* 1619: */ }
  1620. /* 1620: */ try
  1621. /* 1621: */ {
  1622. /* 1622:1591 */ newRange = Integer.valueOf(split[2]).intValue();
  1623. /* 1623: */ }
  1624. /* 1624: */ catch (Exception e)
  1625. /* 1625: */ {
  1626. /* 1626:1593 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetRangeInvalid + " " + this.plugin.myLocale().adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1627. /* 1627: */
  1628. /* 1628:1595 */ return true;
  1629. /* 1629: */ }
  1630. /* 1630:1597 */ if ((newRange < 10) || (newRange > maxRange))
  1631. /* 1631: */ {
  1632. /* 1632:1598 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminSetRangeInvalid + " " + this.plugin.myLocale().adminSetRangeTip.replace("[max]", String.valueOf(maxRange)));
  1633. /* 1633: */
  1634. /* 1634:1600 */ return true;
  1635. /* 1635: */ }
  1636. /* 1636:1602 */ island.setProtectionSize(newRange);
  1637. /* 1637:1603 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminSetRangeSet.replace("[number]", String.valueOf(newRange)));
  1638. /* 1638:1604 */ showInfo(playerUUID, sender);
  1639. /* 1639:1605 */ this.plugin.getGrid().saveGrid();
  1640. /* 1640:1606 */ return true;
  1641. /* 1641: */ }
  1642. /* 1642:1608 */ if (split[0].equalsIgnoreCase("setdeaths"))
  1643. /* 1643: */ {
  1644. /* 1644:1610 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1645. /* 1645:1611 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1646. /* 1646: */ {
  1647. /* 1647:1612 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1648. /* 1648:1613 */ return true;
  1649. /* 1649: */ }
  1650. /* 1650: */ try
  1651. /* 1651: */ {
  1652. /* 1652:1616 */ int newDeaths = Integer.valueOf(split[2]).intValue();
  1653. /* 1653:1617 */ int oldDeaths = this.plugin.getPlayers().getDeaths(playerUUID);
  1654. /* 1654:1618 */ this.plugin.getPlayers().setDeaths(playerUUID, newDeaths);
  1655. /* 1655:1619 */ sender.sendMessage(ChatColor.GREEN + this.plugin.getPlayers().getName(playerUUID) + " " + oldDeaths + " >>> " + newDeaths + " " + this.plugin.myLocale().deaths);
  1656. /* 1656: */ }
  1657. /* 1657: */ catch (Exception e)
  1658. /* 1658: */ {
  1659. /* 1659:1621 */ sender.sendMessage(ChatColor.GREEN + this.plugin.getPlayers().getName(playerUUID) + " " + this.plugin.getPlayers().getDeaths(playerUUID) + " " + this.plugin.myLocale().deaths);
  1660. /* 1660:1622 */ sender.sendMessage(ChatColor.YELLOW + label + " setdeaths <player> <number>:" + ChatColor.WHITE + " " + this.plugin.myLocale().adminHelpsetDeaths);
  1661. /* 1661:1623 */ return true;
  1662. /* 1662: */ }
  1663. /* 1663:1625 */ return true;
  1664. /* 1664: */ }
  1665. /* 1665:1629 */ if (split[0].equalsIgnoreCase("setbiome"))
  1666. /* 1666: */ {
  1667. /* 1667:1631 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1668. /* 1668:1633 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1669. /* 1669: */ {
  1670. /* 1670:1634 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1671. /* 1671:1635 */ return true;
  1672. /* 1672: */ }
  1673. /* 1673:1638 */ if (this.plugin.getPlayers().inTeam(playerUUID)) {
  1674. /* 1674:1639 */ playerUUID = this.plugin.getPlayers().getTeamLeader(playerUUID);
  1675. /* 1675: */ }
  1676. /* 1676:1641 */ Island island = this.plugin.getGrid().getIsland(playerUUID);
  1677. /* 1677:1642 */ if (island == null)
  1678. /* 1678: */ {
  1679. /* 1679:1643 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIsland);
  1680. /* 1680:1644 */ return true;
  1681. /* 1681: */ }
  1682. /* 1682:1647 */ Biome biome = null;
  1683. /* 1683:1648 */ String biomeName = split[2].toUpperCase();
  1684. /* 1684: */ try
  1685. /* 1685: */ {
  1686. /* 1686:1650 */ biome = Biome.valueOf(biomeName);
  1687. /* 1687:1651 */ biomeName = biome.name();
  1688. /* 1688:1652 */ if (!this.plugin.getConfig().contains("biomes." + biomeName))
  1689. /* 1689: */ {
  1690. /* 1690:1653 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().biomeUnknown);
  1691. /* 1691:1656 */ for (Biome b : Biome.values()) {
  1692. /* 1692:1657 */ if (this.plugin.getConfig().contains("biomes." + b.name())) {
  1693. /* 1693:1658 */ sender.sendMessage(b.name());
  1694. /* 1694: */ }
  1695. /* 1695: */ }
  1696. /* 1696:1661 */ return true;
  1697. /* 1697: */ }
  1698. /* 1698:1664 */ biomeName = this.plugin.getConfig().getString("biomes." + biomeName + ".friendlyname", Util.prettifyText(biomeName));
  1699. /* 1699: */ }
  1700. /* 1700: */ catch (Exception e)
  1701. /* 1701: */ {
  1702. /* 1702:1667 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().biomeUnknown);
  1703. /* 1703:1668 */ for (Biome b : Biome.values()) {
  1704. /* 1704:1669 */ if (this.plugin.getConfig().contains("biomes." + b.name())) {
  1705. /* 1705:1670 */ sender.sendMessage(b.name());
  1706. /* 1706: */ }
  1707. /* 1707: */ }
  1708. /* 1708:1673 */ return true;
  1709. /* 1709: */ }
  1710. /* 1710:1677 */ this.plugin.getBiomes().setIslandBiome(island, biome);
  1711. /* 1711:1678 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().biomeSet.replace("[biome]", biomeName));
  1712. /* 1712:1679 */ Player targetPlayer = this.plugin.getServer().getPlayer(playerUUID);
  1713. /* 1713:1680 */ if (targetPlayer != null) {
  1714. /* 1714:1682 */ targetPlayer.sendMessage("[Admin] " + ChatColor.GREEN + this.plugin.myLocale(playerUUID).biomeSet.replace("[biome]", biomeName));
  1715. /* 1715: */ } else {
  1716. /* 1716:1684 */ this.plugin.getMessages().setMessage(playerUUID, "[Admin] " + ChatColor.GREEN + this.plugin.myLocale(playerUUID).biomeSet.replace("[biome]", biomeName));
  1717. /* 1717: */ }
  1718. /* 1718:1686 */ return true;
  1719. /* 1719: */ }
  1720. /* 1720:1689 */ if (split[0].equalsIgnoreCase("team"))
  1721. /* 1721: */ {
  1722. /* 1722:1691 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[2], true);
  1723. /* 1723:1692 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1724. /* 1724: */ {
  1725. /* 1725:1693 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1726. /* 1726:1694 */ return true;
  1727. /* 1727: */ }
  1728. /* 1728:1696 */ if (split[1].equalsIgnoreCase("kick"))
  1729. /* 1729: */ {
  1730. /* 1730:1698 */ if (!this.plugin.getPlayers().inTeam(playerUUID))
  1731. /* 1731: */ {
  1732. /* 1732:1699 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoTeam);
  1733. /* 1733:1700 */ return true;
  1734. /* 1734: */ }
  1735. /* 1735:1702 */ UUID teamLeader = this.plugin.getPlayers().getTeamLeader(playerUUID);
  1736. /* 1736:1703 */ if (teamLeader == null)
  1737. /* 1737: */ {
  1738. /* 1738:1707 */ this.plugin.getPlayers().setLeaveTeam(playerUUID);
  1739. /* 1739:1708 */ this.plugin.getPlayers().setHomeLocation(playerUUID, null);
  1740. /* 1740:1709 */ this.plugin.getPlayers().setIslandLocation(playerUUID, null);
  1741. /* 1741: */
  1742. /* 1742:1711 */ this.plugin.getWarpSignsListener().removeWarp(playerUUID);
  1743. /* 1743:1712 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().kicknameRemoved.replace("[name]", split[2]));
  1744. /* 1744:1713 */ return true;
  1745. /* 1745: */ }
  1746. /* 1746:1716 */ if (!teamLeader.equals(playerUUID))
  1747. /* 1747: */ {
  1748. /* 1748:1718 */ this.plugin.getPlayers().setLeaveTeam(playerUUID);
  1749. /* 1749:1719 */ this.plugin.getPlayers().setHomeLocation(playerUUID, null);
  1750. /* 1750:1720 */ this.plugin.getPlayers().setIslandLocation(playerUUID, null);
  1751. /* 1751: */
  1752. /* 1752: */
  1753. /* 1753:1723 */ this.plugin.getPlayers().removeMember(teamLeader, playerUUID);
  1754. /* 1754:1724 */ if (this.plugin.getPlayers().getMembers(teamLeader).size() < 2) {
  1755. /* 1755:1725 */ this.plugin.getPlayers().setLeaveTeam(teamLeader);
  1756. /* 1756: */ }
  1757. /* 1757:1728 */ this.plugin.getWarpSignsListener().removeWarp(playerUUID);
  1758. /* 1758:1729 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().kicknameRemoved.replace("[name]", split[2]));
  1759. /* 1759:1730 */ return true;
  1760. /* 1760: */ }
  1761. /* 1761:1732 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminTeamKickLeader.replace("[label]", label).replace("[name]", split[2]));
  1762. /* 1762:1733 */ return true;
  1763. /* 1763: */ }
  1764. /* 1764:1736 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownCommand);
  1765. /* 1765:1737 */ return false;
  1766. /* 1766: */ }
  1767. /* 1767:1739 */ if (split[0].equalsIgnoreCase("completechallenge"))
  1768. /* 1768: */ {
  1769. /* 1769:1741 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1770. /* 1770:1742 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1771. /* 1771: */ {
  1772. /* 1772:1743 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1773. /* 1773:1744 */ return true;
  1774. /* 1774: */ }
  1775. /* 1775:1746 */ if ((this.plugin.getPlayers().checkChallenge(playerUUID, split[2].toLowerCase())) || (!this.plugin.getPlayers().get(playerUUID).challengeExists(split[2].toLowerCase())))
  1776. /* 1776: */ {
  1777. /* 1777:1748 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().completeChallengeerrorChallengeDoesNotExist);
  1778. /* 1778:1749 */ return true;
  1779. /* 1779: */ }
  1780. /* 1780:1751 */ this.plugin.getPlayers().get(playerUUID).completeChallenge(split[2].toLowerCase());
  1781. /* 1781:1752 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().completeChallengechallangeCompleted.replace("[challengename]", split[2].toLowerCase()).replace("[name]", split[1]));
  1782. /* 1782: */
  1783. /* 1783:1754 */ return true;
  1784. /* 1784: */ }
  1785. /* 1785:1755 */ if (split[0].equalsIgnoreCase("resetchallenge"))
  1786. /* 1786: */ {
  1787. /* 1787:1757 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[1], true);
  1788. /* 1788:1758 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1789. /* 1789: */ {
  1790. /* 1790:1759 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1791. /* 1791:1760 */ return true;
  1792. /* 1792: */ }
  1793. /* 1793:1762 */ if ((!this.plugin.getPlayers().checkChallenge(playerUUID, split[2].toLowerCase())) || (!this.plugin.getPlayers().get(playerUUID).challengeExists(split[2].toLowerCase())))
  1794. /* 1794: */ {
  1795. /* 1795:1764 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().resetChallengeerrorChallengeDoesNotExist);
  1796. /* 1796:1765 */ return true;
  1797. /* 1797: */ }
  1798. /* 1798:1767 */ this.plugin.getPlayers().resetChallenge(playerUUID, split[2].toLowerCase());
  1799. /* 1799:1768 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().resetChallengechallengeReset.replace("[challengename]", split[2].toLowerCase()).replace("[name]", split[1]));
  1800. /* 1800: */
  1801. /* 1801:1770 */ return true;
  1802. /* 1802: */ }
  1803. /* 1803:1771 */ if ((split[0].equalsIgnoreCase("info")) && (split[1].equalsIgnoreCase("challenges")))
  1804. /* 1804: */ {
  1805. /* 1805:1773 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[2], true);
  1806. /* 1806:1776 */ if (!this.plugin.getPlayers().isAKnownPlayer(playerUUID))
  1807. /* 1807: */ {
  1808. /* 1808:1777 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1809. /* 1809:1778 */ return true;
  1810. /* 1810: */ }
  1811. /* 1811:1780 */ showInfoChallenges(playerUUID, sender);
  1812. /* 1812:1781 */ return true;
  1813. /* 1813: */ }
  1814. /* 1814:1784 */ return false;
  1815. /* 1815: */ case 4:
  1816. /* 1816:1787 */ if ((split[0].equalsIgnoreCase("team")) && (split[1].equalsIgnoreCase("add")))
  1817. /* 1817: */ {
  1818. /* 1818:1789 */ UUID playerUUID = this.plugin.getPlayers().getUUID(split[2], true);
  1819. /* 1819:1790 */ Player targetPlayer = this.plugin.getServer().getPlayer(playerUUID);
  1820. /* 1820:1791 */ UUID teamLeader = this.plugin.getPlayers().getUUID(split[3], true);
  1821. /* 1821:1792 */ if ((!this.plugin.getPlayers().isAKnownPlayer(playerUUID)) || (!this.plugin.getPlayers().isAKnownPlayer(teamLeader)))
  1822. /* 1822: */ {
  1823. /* 1823:1793 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownPlayer);
  1824. /* 1824:1794 */ return true;
  1825. /* 1825: */ }
  1826. /* 1826:1796 */ if (playerUUID.equals(teamLeader))
  1827. /* 1827: */ {
  1828. /* 1828:1797 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminTeamAddLeaderToOwn);
  1829. /* 1829:1798 */ return true;
  1830. /* 1830: */ }
  1831. /* 1831:1801 */ if (!this.plugin.getPlayers().hasIsland(teamLeader))
  1832. /* 1832: */ {
  1833. /* 1833:1802 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminTeamAddLeaderNoIsland);
  1834. /* 1834:1803 */ return true;
  1835. /* 1835: */ }
  1836. /* 1836:1806 */ if (this.plugin.getPlayers().inTeam(playerUUID))
  1837. /* 1837: */ {
  1838. /* 1838:1807 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().inviteerrorThatPlayerIsAlreadyInATeam);
  1839. /* 1839:1808 */ return true;
  1840. /* 1840: */ }
  1841. /* 1841:1813 */ if (!this.plugin.getPlayers().getMembers(teamLeader).contains(teamLeader))
  1842. /* 1842: */ {
  1843. /* 1843:1815 */ this.plugin.getPlayers().setJoinTeam(teamLeader, teamLeader, this.plugin.getPlayers().getIslandLocation(teamLeader));
  1844. /* 1844:1816 */ this.plugin.getPlayers().addTeamMember(teamLeader, teamLeader);
  1845. /* 1845:1817 */ sender.sendMessage(ChatColor.GOLD + this.plugin.myLocale().adminTeamAddedLeader);
  1846. /* 1846: */ }
  1847. /* 1847:1820 */ if (targetPlayer != null) {
  1848. /* 1848:1821 */ targetPlayer.performCommand("island decline");
  1849. /* 1849: */ }
  1850. /* 1850:1824 */ if (this.plugin.getPlayers().hasIsland(playerUUID))
  1851. /* 1851: */ {
  1852. /* 1852:1825 */ Location islandLoc = this.plugin.getPlayers().getIslandLocation(playerUUID);
  1853. /* 1853:1826 */ if (islandLoc != null) {
  1854. /* 1854:1827 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminTeamNowUnowned.replace("[name]", this.plugin.getPlayers().getName(playerUUID)).replace("[location]", new StringBuilder().append(islandLoc.getBlockX()).append(" ").append(islandLoc.getBlockZ()).toString()));
  1855. /* 1855: */ }
  1856. /* 1856: */ }
  1857. /* 1857:1833 */ this.plugin.deletePlayerIsland(playerUUID, false);
  1858. /* 1858: */
  1859. /* 1859:1835 */ this.plugin.getPlayers().setJoinTeam(playerUUID, teamLeader, this.plugin.getPlayers().getIslandLocation(teamLeader));
  1860. /* 1860:1837 */ if (this.plugin.getPlayers().getHomeLocation(teamLeader) != null)
  1861. /* 1861: */ {
  1862. /* 1862:1838 */ this.plugin.getPlayers().setHomeLocation(playerUUID, this.plugin.getPlayers().getHomeLocation(teamLeader));
  1863. /* 1863:1839 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminTeamSettingHome);
  1864. /* 1864: */ }
  1865. /* 1865: */ else
  1866. /* 1866: */ {
  1867. /* 1867:1841 */ this.plugin.getPlayers().setHomeLocation(playerUUID, this.plugin.getPlayers().getIslandLocation(teamLeader));
  1868. /* 1868:1842 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminTeamSettingHome);
  1869. /* 1869: */ }
  1870. /* 1870:1846 */ if (!this.plugin.getPlayers().getMembers(teamLeader).contains(playerUUID))
  1871. /* 1871: */ {
  1872. /* 1872:1847 */ this.plugin.getPlayers().addTeamMember(teamLeader, playerUUID);
  1873. /* 1873:1848 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminTeamAddingPlayer);
  1874. /* 1874: */ }
  1875. /* 1875: */ else
  1876. /* 1876: */ {
  1877. /* 1877:1850 */ sender.sendMessage(ChatColor.GOLD + this.plugin.myLocale().adminTeamAlreadyOnTeam);
  1878. /* 1878: */ }
  1879. /* 1879:1853 */ if (targetPlayer != null) {
  1880. /* 1880:1854 */ this.plugin.getGrid().homeTeleport(targetPlayer);
  1881. /* 1881: */ }
  1882. /* 1882:1856 */ this.plugin.getGrid().saveGrid();
  1883. /* 1883:1857 */ return true;
  1884. /* 1884: */ }
  1885. /* 1885:1859 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorUnknownCommand);
  1886. /* 1886:1860 */ return false;
  1887. /* 1887: */ }
  1888. /* 1888:1863 */ return false;
  1889. /* 1889: */ }
  1890. /* 1890: */
  1891. /* 1891: */ private void deleteIslands(Island island, CommandSender sender)
  1892. /* 1892: */ {
  1893. /* 1893:1873 */ this.plugin.getGrid().removePlayersFromIsland(island, null);
  1894. /* 1894: */
  1895. /* 1895:1875 */ this.plugin.getBiomes().setIslandBiome(island, Settings.defaultBiome);
  1896. /* 1896:1876 */ new DeleteIslandChunk(this.plugin, island);
  1897. /* 1897: */
  1898. /* 1898:1878 */ this.plugin.getGrid().saveGrid();
  1899. /* 1899: */ }
  1900. /* 1900: */
  1901. /* 1901: */ private void purgeUnownedIslands(final CommandSender sender)
  1902. /* 1902: */ {
  1903. /* 1903:1887 */ this.purgeFlag = true;
  1904. /* 1904:1888 */ final int total = this.unowned.size();
  1905. /* 1905:1889 */ new BukkitRunnable()
  1906. /* 1906: */ {
  1907. /* 1907: */ public void run()
  1908. /* 1908: */ {
  1909. /* 1909:1892 */ if (AdminCmd.this.unowned.isEmpty())
  1910. /* 1910: */ {
  1911. /* 1911:1893 */ AdminCmd.this.purgeFlag = false;
  1912. /* 1912:1894 */ sender.sendMessage(ChatColor.YELLOW + AdminCmd.this.plugin.myLocale().purgefinished);
  1913. /* 1913:1895 */ cancel();
  1914. /* 1914:1896 */ AdminCmd.this.plugin.getGrid().saveGrid();
  1915. /* 1915: */ }
  1916. /* 1916:1898 */ if (AdminCmd.this.unowned.size() > 0)
  1917. /* 1917: */ {
  1918. /* 1918:1899 */ Iterator<Map.Entry<String, Island>> it = AdminCmd.this.unowned.entrySet().iterator();
  1919. /* 1919:1900 */ Map.Entry<String, Island> entry = (Map.Entry)it.next();
  1920. /* 1920:1901 */ if (((Island)entry.getValue()).getOwner() == null)
  1921. /* 1921: */ {
  1922. /* 1922:1902 */ sender.sendMessage(ChatColor.YELLOW + "[" + (total - AdminCmd.this.unowned.size() + 1) + "/" + total + "] " + AdminCmd.this.plugin.myLocale().purgeRemovingAt.replace("[location]", new StringBuilder().append(((Island)entry.getValue()).getCenter().getWorld().getName()).append(" ").append(((Island)entry.getValue()).getCenter().getBlockX()).append(",").append(((Island)entry.getValue()).getCenter().getBlockZ()).toString()));
  1923. /* 1923: */
  1924. /* 1924: */
  1925. /* 1925:1905 */ AdminCmd.this.deleteIslands((Island)entry.getValue(), sender);
  1926. /* 1926: */ }
  1927. /* 1927:1908 */ it.remove();
  1928. /* 1928: */ }
  1929. /* 1929:1910 */ sender.sendMessage(AdminCmd.this.plugin.myLocale().purgeNowWaiting);
  1930. /* 1930: */ }
  1931. /* 1931:1910 */ }.runTaskTimer(this.plugin, 0L, 20L);
  1932. /* 1932: */ }
  1933. /* 1933: */
  1934. /* 1934: */ private void countUnowned(final CommandSender sender)
  1935. /* 1935: */ {
  1936. /* 1936:1919 */ this.unowned = this.plugin.getGrid().getUnownedIslands();
  1937. /* 1937:1920 */ if (!this.unowned.isEmpty())
  1938. /* 1938: */ {
  1939. /* 1939:1921 */ this.purgeFlag = true;
  1940. /* 1940:1922 */ sender.sendMessage(this.plugin.myLocale().purgeCountingUnowned);
  1941. /* 1941: */
  1942. /* 1942:1924 */ final File playerFolder = this.plugin.getPlayersFolder();
  1943. /* 1943: */
  1944. /* 1944:1926 */ this.asyncPending = true;
  1945. /* 1945: */
  1946. /* 1946:1928 */ this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, new Runnable()
  1947. /* 1947: */ {
  1948. /* 1948: */ public void run()
  1949. /* 1949: */ {
  1950. /* 1950:1934 */ FilenameFilter ymlFilter = new FilenameFilter()
  1951. /* 1951: */ {
  1952. /* 1952: */ public boolean accept(File dir, String name)
  1953. /* 1953: */ {
  1954. /* 1954:1937 */ String lowercaseName = name.toLowerCase();
  1955. /* 1955:1938 */ if (lowercaseName.endsWith(".yml")) {
  1956. /* 1956:1939 */ return true;
  1957. /* 1957: */ }
  1958. /* 1958:1941 */ return false;
  1959. /* 1959: */ }
  1960. /* 1960: */ };
  1961. /* 1961:1945 */ for (File file : playerFolder.listFiles(ymlFilter)) {
  1962. /* 1962: */ try
  1963. /* 1963: */ {
  1964. /* 1964:1947 */ Scanner scanner = new Scanner(file);
  1965. /* 1965:1948 */ while (scanner.hasNextLine())
  1966. /* 1966: */ {
  1967. /* 1967:1949 */ String lineFromFile = scanner.nextLine();
  1968. /* 1968:1950 */ if (lineFromFile.contains("islandLocation:"))
  1969. /* 1969: */ {
  1970. /* 1970:1952 */ String loc = lineFromFile.substring(lineFromFile.indexOf(' ')).trim();
  1971. /* 1971:1954 */ if (!AdminCmd.this.unowned.containsKey(loc)) {
  1972. /* 1972: */ break;
  1973. /* 1973: */ }
  1974. /* 1974:1956 */ AdminCmd.this.unowned.remove(loc); break;
  1975. /* 1975: */ }
  1976. /* 1976: */ }
  1977. /* 1977:1961 */ scanner.close();
  1978. /* 1978: */ }
  1979. /* 1979: */ catch (FileNotFoundException e)
  1980. /* 1980: */ {
  1981. /* 1981:1963 */ e.printStackTrace();
  1982. /* 1982: */ }
  1983. /* 1983: */ }
  1984. /* 1984:1967 */ AdminCmd.this.asyncPending = false;
  1985. /* 1985: */ }
  1986. /* 1986:1970 */ });
  1987. /* 1987:1971 */ new BukkitRunnable()
  1988. /* 1988: */ {
  1989. /* 1989: */ public void run()
  1990. /* 1990: */ {
  1991. /* 1991:1975 */ if (AdminCmd.this.asyncPending)
  1992. /* 1992: */ {
  1993. /* 1993:1977 */ sender.sendMessage(AdminCmd.this.plugin.myLocale().purgeStillChecking);
  1994. /* 1994: */ }
  1995. /* 1995: */ else
  1996. /* 1996: */ {
  1997. /* 1997:1980 */ if (AdminCmd.this.unowned.size() > 0)
  1998. /* 1998: */ {
  1999. /* 1999:1981 */ if (Settings.GAMETYPE.equals(Settings.GameType.ASKYBLOCK)) {
  2000. /* 2000:1982 */ sender.sendMessage(AdminCmd.this.plugin.myLocale().purgeSkyBlockFound.replace("[number]", String.valueOf(AdminCmd.this.unowned.size())));
  2001. /* 2001: */ } else {
  2002. /* 2002:1984 */ sender.sendMessage(AdminCmd.this.plugin.myLocale().purgeAcidFound.replace("[number]", String.valueOf(AdminCmd.this.unowned.size())));
  2003. /* 2003: */ }
  2004. /* 2004:1986 */ AdminCmd.this.purgeUnownedConfirm = true;
  2005. /* 2005:1987 */ AdminCmd.this.purgeFlag = false;
  2006. /* 2006:1988 */ AdminCmd.this.plugin.getServer().getScheduler().runTaskLater(AdminCmd.this.plugin, new Runnable()
  2007. /* 2007: */ {
  2008. /* 2008: */ public void run()
  2009. /* 2009: */ {
  2010. /* 2010:1992 */ if (AdminCmd.this.purgeUnownedConfirm)
  2011. /* 2011: */ {
  2012. /* 2012:1993 */ AdminCmd.this.purgeUnownedConfirm = false;
  2013. /* 2013:1994 */ AdminCmd.8.this.val$sender.sendMessage(AdminCmd.this.plugin.myLocale().purgepurgeCancelled);
  2014. /* 2014: */ }
  2015. /* 2015: */ }
  2016. /* 2016:1994 */ }, 400L);
  2017. /* 2017: */ }
  2018. /* 2018: */ else
  2019. /* 2019: */ {
  2020. /* 2020:1998 */ sender.sendMessage(AdminCmd.this.plugin.myLocale().purgenoneFound);
  2021. /* 2021:1999 */ AdminCmd.this.purgeFlag = false;
  2022. /* 2022: */ }
  2023. /* 2023:2001 */ cancel();
  2024. /* 2024:2002 */ AdminCmd.this.plugin.getGrid().saveGrid();
  2025. /* 2025: */ }
  2026. /* 2026: */ }
  2027. /* 2027:2002 */ }.runTaskTimer(this.plugin, 20L, 20L);
  2028. /* 2028: */ }
  2029. /* 2029: */ else
  2030. /* 2030: */ {
  2031. /* 2031:2008 */ sender.sendMessage(this.plugin.myLocale().purgenoneFound);
  2032. /* 2032: */ }
  2033. /* 2033: */ }
  2034. /* 2034: */
  2035. /* 2035: */ public static Location getClosestIsland(Location location)
  2036. /* 2036: */ {
  2037. /* 2037:2019 */ long x = Math.round(location.getBlockX() / Settings.islandDistance) * Settings.islandDistance + Settings.islandXOffset;
  2038. /* 2038:2020 */ long z = Math.round(location.getBlockZ() / Settings.islandDistance) * Settings.islandDistance + Settings.islandZOffset;
  2039. /* 2039:2021 */ long y = Settings.island_level;
  2040. /* 2040:2022 */ return new Location(location.getWorld(), x, y, z);
  2041. /* 2041: */ }
  2042. /* 2042: */
  2043. /* 2043: */ private void showInfo(UUID playerUUID, CommandSender sender)
  2044. /* 2044: */ {
  2045. /* 2045:2032 */ sender.sendMessage(this.plugin.myLocale().adminInfoPlayer + ": " + ChatColor.GREEN + this.plugin.getPlayers().getName(playerUUID));
  2046. /* 2046:2033 */ sender.sendMessage(ChatColor.WHITE + "UUID: " + playerUUID.toString());
  2047. /* 2047: */
  2048. /* 2048:2035 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().levelislandLevel + ": " + this.plugin.getPlayers().getIslandLevel(playerUUID));
  2049. /* 2049: */ try
  2050. /* 2050: */ {
  2051. /* 2051:2038 */ Date d = new Date(this.plugin.getServer().getOfflinePlayer(playerUUID).getLastPlayed());
  2052. /* 2052:2039 */ sender.sendMessage(ChatColor.GOLD + this.plugin.myLocale().adminInfoLastLogin + ": " + d.toString());
  2053. /* 2053: */ }
  2054. /* 2054: */ catch (Exception e) {}
  2055. /* 2055:2042 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().deaths + ": " + this.plugin.getPlayers().getDeaths(playerUUID));
  2056. /* 2056:2043 */ Location islandLoc = null;
  2057. /* 2057:2045 */ if (this.plugin.getPlayers().inTeam(playerUUID))
  2058. /* 2058: */ {
  2059. /* 2059:2046 */ UUID leader = this.plugin.getPlayers().getTeamLeader(playerUUID);
  2060. /* 2060:2047 */ List<UUID> pList = this.plugin.getPlayers().getMembers(leader);
  2061. /* 2061:2048 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminInfoTeamLeader + ": " + this.plugin.getPlayers().getName(leader));
  2062. /* 2062:2049 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminInfoTeamMembers + ":");
  2063. /* 2063:2050 */ for (UUID member : pList) {
  2064. /* 2064:2051 */ if (!member.equals(leader)) {
  2065. /* 2065:2052 */ sender.sendMessage(ChatColor.WHITE + " - " + this.plugin.getPlayers().getName(member));
  2066. /* 2066: */ }
  2067. /* 2067: */ }
  2068. /* 2068:2055 */ islandLoc = this.plugin.getPlayers().getTeamIslandLocation(playerUUID);
  2069. /* 2069: */ }
  2070. /* 2070: */ else
  2071. /* 2071: */ {
  2072. /* 2072:2057 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().errorNoTeam);
  2073. /* 2073:2058 */ if (this.plugin.getPlayers().hasIsland(playerUUID)) {
  2074. /* 2074:2059 */ islandLoc = this.plugin.getPlayers().getIslandLocation(playerUUID);
  2075. /* 2075: */ }
  2076. /* 2076:2061 */ if (this.plugin.getPlayers().getTeamLeader(playerUUID) != null) {
  2077. /* 2077:2062 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminInfoerrorNullTeamLeader);
  2078. /* 2078: */ }
  2079. /* 2079:2064 */ if (!this.plugin.getPlayers().getMembers(playerUUID).isEmpty()) {
  2080. /* 2080:2065 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminInfoerrorTeamMembersExist);
  2081. /* 2081: */ }
  2082. /* 2082: */ }
  2083. /* 2083:2068 */ if (islandLoc != null)
  2084. /* 2084: */ {
  2085. /* 2085:2069 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminInfoislandLocation + ":" + ChatColor.WHITE + " (" + islandLoc.getBlockX() + "," + islandLoc.getBlockY() + "," + islandLoc.getBlockZ() + ")");
  2086. /* 2086: */
  2087. /* 2087:2071 */ Island island = this.plugin.getGrid().getIslandAt(islandLoc);
  2088. /* 2088:2072 */ if (island == null) {
  2089. /* 2089:2073 */ if (this.plugin.getGrid().onGrid(islandLoc))
  2090. /* 2090: */ {
  2091. /* 2091:2074 */ this.plugin.getLogger().warning("Player has an island, but it is not in the grid. Adding it now...");
  2092. /* 2092:2075 */ island = this.plugin.getGrid().addIsland(islandLoc.getBlockX(), islandLoc.getBlockZ(), playerUUID);
  2093. /* 2093: */ }
  2094. /* 2094: */ else
  2095. /* 2095: */ {
  2096. /* 2096:2077 */ this.plugin.getLogger().severe("Player file says they have an island, but it is not in the grid and has the wrong coordinates to be added! Use register to correct!");
  2097. /* 2097:2078 */ sender.sendMessage(ChatColor.RED + "See console for error!");
  2098. /* 2098:2079 */ return;
  2099. /* 2099: */ }
  2100. /* 2100: */ }
  2101. /* 2101:2082 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncenter.replace("[location]", new StringBuilder().append(island.getCenter().getBlockX()).append(",").append(island.getCenter().getBlockZ()).toString()));
  2102. /* 2102:2083 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnlimits.replace("[min]", new StringBuilder().append(island.getMinX()).append(",").append(island.getMinZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinX() + island.getIslandDistance() - 1).append(",").append(island.getMinZ() + island.getIslandDistance() - 1).toString()));
  2103. /* 2103: */
  2104. /* 2104:2085 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawnrange.replace("[number]", String.valueOf(island.getProtectionSize())));
  2105. /* 2105:2086 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminSetSpawncoords.replace("[min]", new StringBuilder().append(island.getMinProtectedX()).append(", ").append(island.getMinProtectedZ()).toString()).replace("[max]", new StringBuilder().append(island.getMinProtectedX() + island.getProtectionSize() - 1).append(", ").append(island.getMinProtectedZ() + island.getProtectionSize() - 1).toString()));
  2106. /* 2106:2089 */ if (island.isSpawn()) {
  2107. /* 2107:2090 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminInfoIsSpawn);
  2108. /* 2108: */ }
  2109. /* 2109:2092 */ if (island.isLocked()) {
  2110. /* 2110:2093 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminInfoIsLocked);
  2111. /* 2111: */ } else {
  2112. /* 2112:2095 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminInfoIsUnlocked);
  2113. /* 2113: */ }
  2114. /* 2114:2097 */ if (island.isPurgeProtected()) {
  2115. /* 2115:2098 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminInfoIsProtected);
  2116. /* 2116: */ } else {
  2117. /* 2117:2100 */ sender.sendMessage(ChatColor.GREEN + this.plugin.myLocale().adminInfoIsUnprotected);
  2118. /* 2118: */ }
  2119. /* 2119:2102 */ List<UUID> banList = this.plugin.getPlayers().getBanList(playerUUID);
  2120. /* 2120:2103 */ if (!banList.isEmpty())
  2121. /* 2121: */ {
  2122. /* 2122:2104 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminInfoBannedPlayers + ":");
  2123. /* 2123:2105 */ String list = "";
  2124. /* 2124:2106 */ for (UUID uuid : banList)
  2125. /* 2125: */ {
  2126. /* 2126:2107 */ Player target = this.plugin.getServer().getPlayer(uuid);
  2127. /* 2127:2108 */ if (target != null) {
  2128. /* 2128:2110 */ list = list + target.getDisplayName() + ", ";
  2129. /* 2129: */ } else {
  2130. /* 2130:2112 */ list = list + this.plugin.getPlayers().getName(uuid) + ", ";
  2131. /* 2131: */ }
  2132. /* 2132: */ }
  2133. /* 2133:2115 */ if (!list.isEmpty()) {
  2134. /* 2134:2116 */ sender.sendMessage(ChatColor.RED + list.substring(0, list.length() - 2));
  2135. /* 2135: */ }
  2136. /* 2136: */ }
  2137. /* 2137:2120 */ sender.sendMessage(ChatColor.YELLOW + this.plugin.myLocale().adminInfoHoppers.replace("[number]", String.valueOf(island.getHopperCount())));
  2138. /* 2138: */ }
  2139. /* 2139: */ else
  2140. /* 2140: */ {
  2141. /* 2141:2122 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().errorNoIslandOther);
  2142. /* 2142: */ }
  2143. /* 2143: */ }
  2144. /* 2144: */
  2145. /* 2145: */ private void showInfoChallenges(UUID playerUUID, CommandSender sender)
  2146. /* 2146: */ {
  2147. /* 2147:2133 */ sender.sendMessage("Name:" + ChatColor.GREEN + this.plugin.getPlayers().getName(playerUUID));
  2148. /* 2148:2134 */ sender.sendMessage(ChatColor.WHITE + "UUID: " + playerUUID.toString());
  2149. /* 2149: */
  2150. /* 2150:2136 */ sender.sendMessage(ChatColor.WHITE + this.plugin.myLocale().challengesguiTitle + ":");
  2151. /* 2151:2137 */ HashMap<String, Boolean> challenges = this.plugin.getPlayers().getChallengeStatus(playerUUID);
  2152. /* 2152:2138 */ HashMap<String, Integer> challengeTimes = this.plugin.getPlayers().getChallengeTimes(playerUUID);
  2153. /* 2153:2139 */ for (String c : challenges.keySet()) {
  2154. /* 2154:2140 */ if (challengeTimes.containsKey(c)) {
  2155. /* 2155:2141 */ sender.sendMessage(c + ": " + (((Boolean)challenges.get(c)).booleanValue() ? ChatColor.GREEN + this.plugin.myLocale().challengescomplete : new StringBuilder().append(ChatColor.AQUA).append(this.plugin.myLocale().challengesincomplete).toString()) + "(" + this.plugin.getPlayers().checkChallengeTimes(playerUUID, c) + ")");
  2156. /* 2156: */ } else {
  2157. /* 2157:2146 */ sender.sendMessage(c + ": " + (((Boolean)challenges.get(c)).booleanValue() ? ChatColor.GREEN + this.plugin.myLocale().challengescomplete : new StringBuilder().append(ChatColor.AQUA).append(this.plugin.myLocale().challengesincomplete).toString()));
  2158. /* 2158: */ }
  2159. /* 2159: */ }
  2160. /* 2160: */ }
  2161. /* 2161: */
  2162. /* 2162: */ private boolean checkAdminPerms(Player player2, String[] split)
  2163. /* 2163: */ {
  2164. /* 2164:2154 */ if (player2.isOp()) {
  2165. /* 2165:2155 */ return true;
  2166. /* 2166: */ }
  2167. /* 2167:2157 */ String check = split[0];
  2168. /* 2168:2158 */ if (check.equalsIgnoreCase("confirm")) {
  2169. /* 2169:2159 */ check = "purge";
  2170. /* 2170: */ }
  2171. /* 2171:2160 */ if (VaultHelper.checkPerm(player2, "askyblock.admin." + split[0].toLowerCase())) {
  2172. /* 2172:2161 */ return true;
  2173. /* 2173: */ }
  2174. /* 2174:2163 */ return false;
  2175. /* 2175: */ }
  2176. /* 2176: */
  2177. /* 2177: */ private boolean checkModPerms(Player player2, String[] split)
  2178. /* 2178: */ {
  2179. /* 2179:2168 */ if (player2.isOp()) {
  2180. /* 2180:2169 */ return true;
  2181. /* 2181: */ }
  2182. /* 2182:2171 */ String check = split[0];
  2183. /* 2183:2173 */ if (check.contains("challenge".toLowerCase())) {
  2184. /* 2184:2174 */ check = "challenges";
  2185. /* 2185: */ }
  2186. /* 2186:2176 */ if (VaultHelper.checkPerm(player2, "askyblock.mod." + split[0].toLowerCase())) {
  2187. /* 2187:2177 */ return true;
  2188. /* 2188: */ }
  2189. /* 2189:2179 */ return false;
  2190. /* 2190: */ }
  2191. /* 2191: */
  2192. /* 2192: */ public boolean adminSetPlayerIsland(CommandSender sender, Location l, UUID newOwner)
  2193. /* 2193: */ {
  2194. /* 2194:2196 */ Island island = this.plugin.getGrid().getIslandAt(l);
  2195. /* 2195:2197 */ if (island == null)
  2196. /* 2196: */ {
  2197. /* 2197:2199 */ Location closestIsland = this.plugin.getGrid().getClosestIsland(l);
  2198. /* 2198: */
  2199. /* 2199:2201 */ island = this.plugin.getGrid().getIslandAt(closestIsland);
  2200. /* 2200:2202 */ if (island == null) {
  2201. /* 2201:2204 */ island = this.plugin.getGrid().addIsland(closestIsland.getBlockX(), closestIsland.getBlockZ());
  2202. /* 2202: */ }
  2203. /* 2203: */ }
  2204. /* 2204:2207 */ if (island.isSpawn())
  2205. /* 2205: */ {
  2206. /* 2206:2208 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminRegisterNotSpawn);
  2207. /* 2207:2209 */ return false;
  2208. /* 2208: */ }
  2209. /* 2209:2211 */ UUID oldOwner = island.getOwner();
  2210. /* 2210:2212 */ if (oldOwner != null)
  2211. /* 2211: */ {
  2212. /* 2212:2213 */ if (this.plugin.getPlayers().inTeam(oldOwner))
  2213. /* 2213: */ {
  2214. /* 2214:2214 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminRegisterLeadsTeam.replace("[name]", this.plugin.getPlayers().getName(oldOwner)));
  2215. /* 2215:2215 */ return false;
  2216. /* 2216: */ }
  2217. /* 2217:2217 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminRegisterTaking.replace("[name]", this.plugin.getPlayers().getName(oldOwner)));
  2218. /* 2218:2218 */ this.plugin.getPlayers().setIslandLevel(newOwner, this.plugin.getPlayers().getIslandLevel(oldOwner).intValue());
  2219. /* 2219:2219 */ this.plugin.getPlayers().setTeamIslandLocation(oldOwner, null);
  2220. /* 2220:2220 */ this.plugin.getPlayers().setHasIsland(oldOwner, false);
  2221. /* 2221:2221 */ this.plugin.getPlayers().setIslandLocation(oldOwner, null);
  2222. /* 2222:2222 */ this.plugin.getPlayers().setIslandLevel(oldOwner, 0);
  2223. /* 2223:2223 */ this.plugin.getPlayers().setTeamIslandLocation(oldOwner, null);
  2224. /* 2224: */ }
  2225. /* 2225:2227 */ Island playersIsland = this.plugin.getGrid().getIsland(newOwner);
  2226. /* 2226:2228 */ if (playersIsland != null)
  2227. /* 2227: */ {
  2228. /* 2228:2229 */ sender.sendMessage(ChatColor.RED + this.plugin.myLocale().adminRegisterHadIsland.replace("[name]", this.plugin.getPlayers().getName(playersIsland.getOwner())).replace("[location]", new StringBuilder().append(playersIsland.getCenter().getBlockX()).append(",").append(playersIsland.getCenter().getBlockZ()).toString()));
  2229. /* 2229: */
  2230. /* 2230:2231 */ this.plugin.getGrid().setIslandOwner(playersIsland, null);
  2231. /* 2231: */ }
  2232. /* 2232:2233 */ if (((sender instanceof Player)) && (Settings.createNether) && (Settings.newNether) && (((Player)sender).getWorld().equals(ASkyBlock.getNetherWorld())))
  2233. /* 2233: */ {
  2234. /* 2234:2236 */ this.plugin.getPlayers().setHomeLocation(newOwner, island.getCenter().toVector().toLocation(ASkyBlock.getNetherWorld()));
  2235. /* 2235:2237 */ this.plugin.getPlayers().setIslandLocation(newOwner, island.getCenter().toVector().toLocation(ASkyBlock.getNetherWorld()));
  2236. /* 2236: */ }
  2237. /* 2237: */ else
  2238. /* 2238: */ {
  2239. /* 2239:2240 */ this.plugin.getPlayers().setHomeLocation(newOwner, island.getCenter());
  2240. /* 2240:2241 */ this.plugin.getPlayers().setIslandLocation(newOwner, island.getCenter());
  2241. /* 2241: */ }
  2242. /* 2242:2243 */ this.plugin.getPlayers().setHasIsland(newOwner, true);
  2243. /* 2243: */
  2244. /* 2244: */
  2245. /* 2245:2246 */ this.plugin.getGrid().setIslandOwner(island, newOwner);
  2246. /* 2246:2247 */ return true;
  2247. /* 2247: */ }
  2248. /* 2248: */
  2249. /* 2249: */ public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args)
  2250. /* 2250: */ {
  2251. /* 2251:2253 */ List<String> options = new ArrayList();
  2252. /* 2252:2254 */ String lastArg = args.length != 0 ? args[(args.length - 1)] : "";
  2253. /* 2253:2256 */ if (!(sender instanceof Player))
  2254. /* 2254: */ {
  2255. /* 2255:2260 */ switch (args.length)
  2256. /* 2256: */ {
  2257. /* 2257: */ case 0:
  2258. /* 2258: */ case 1:
  2259. /* 2259:2263 */ options.addAll(Arrays.asList(new String[] { "reload", "topten", "unregister", "delete", "completechallenge", "resetchallenge", "resetallchallenges", "purge", "info", "info", "info", "clearreset", "clearresetall", "setbiome", "topbreeders", "team", "name", "setdeaths", "settingsreset", "setrange", "addrange", "resetname", "register", "cobblestats" }));
  2260. /* 2260: */
  2261. /* 2261: */
  2262. /* 2262: */
  2263. /* 2263: */
  2264. /* 2264: */
  2265. /* 2265:2269 */ break;
  2266. /* 2266: */ case 2:
  2267. /* 2267:2271 */ if ((args[0].equalsIgnoreCase("name")) || (args[0].equalsIgnoreCase("resetname")) || (args[0].equalsIgnoreCase("setdeaths"))) {
  2268. /* 2268:2272 */ options.addAll(Util.getOnlinePlayerList());
  2269. /* 2269: */ }
  2270. /* 2270:2274 */ if ((args[0].equalsIgnoreCase("lock")) || (args[0].equalsIgnoreCase("setrange")) || (args[0].equalsIgnoreCase("addrange"))) {
  2271. /* 2271:2275 */ options.addAll(Util.getOnlinePlayerList());
  2272. /* 2272: */ }
  2273. /* 2273:2277 */ if (args[0].equalsIgnoreCase("resetsign")) {
  2274. /* 2274:2278 */ options.addAll(Util.getOnlinePlayerList());
  2275. /* 2275: */ }
  2276. /* 2276:2280 */ if ((args[0].equalsIgnoreCase("unregister")) || (args[0].equalsIgnoreCase("register"))) {
  2277. /* 2277:2281 */ options.addAll(Util.getOnlinePlayerList());
  2278. /* 2278: */ }
  2279. /* 2279:2283 */ if ((args[0].equalsIgnoreCase("delete")) || (args[0].equalsIgnoreCase("resetchallenge"))) {
  2280. /* 2280:2284 */ options.addAll(Util.getOnlinePlayerList());
  2281. /* 2281: */ }
  2282. /* 2282:2286 */ if ((args[0].equalsIgnoreCase("completechallenge")) || (args[0].equalsIgnoreCase("resetallchallenges"))) {
  2283. /* 2283:2287 */ options.addAll(Util.getOnlinePlayerList());
  2284. /* 2284: */ }
  2285. /* 2285:2289 */ if (args[0].equalsIgnoreCase("info"))
  2286. /* 2286: */ {
  2287. /* 2287:2290 */ options.add("challenges");
  2288. /* 2288:2291 */ options.addAll(Util.getOnlinePlayerList());
  2289. /* 2289: */ }
  2290. /* 2290:2293 */ if (args[0].equalsIgnoreCase("clearreset")) {
  2291. /* 2291:2294 */ options.addAll(Util.getOnlinePlayerList());
  2292. /* 2292: */ }
  2293. /* 2293:2296 */ if (args[0].equalsIgnoreCase("setbiome")) {
  2294. /* 2294:2297 */ options.addAll(Util.getOnlinePlayerList());
  2295. /* 2295: */ }
  2296. /* 2296:2299 */ if (args[0].equalsIgnoreCase("team"))
  2297. /* 2297: */ {
  2298. /* 2298:2300 */ options.add("add");
  2299. /* 2299:2301 */ options.add("kick");
  2300. /* 2300: */ }
  2301. /* 2301:2303 */ if (args[0].equalsIgnoreCase("settingsreset"))
  2302. /* 2302: */ {
  2303. /* 2303:2304 */ options.add("help");
  2304. /* 2304:2305 */ options.add("all");
  2305. /* 2305:2306 */ for (Island.Flags flag : Island.Flags.values()) {
  2306. /* 2306:2307 */ options.add(flag.toString());
  2307. /* 2307: */ }
  2308. /* 2308: */ }
  2309. /* 2309: */ break;
  2310. /* 2310: */ case 3:
  2311. /* 2311:2312 */ if (args[0].equalsIgnoreCase("completechallenge"))
  2312. /* 2312: */ {
  2313. /* 2313:2313 */ UUID uuid = this.plugin.getPlayers().getUUID(args[1]);
  2314. /* 2314:2315 */ if (uuid != null) {
  2315. /* 2315:2316 */ options.addAll(this.plugin.getPlayers().getChallengesNotDone(uuid));
  2316. /* 2316: */ } else {
  2317. /* 2317:2318 */ options.addAll(this.plugin.getChallenges().getAllChallenges());
  2318. /* 2318: */ }
  2319. /* 2319: */ }
  2320. /* 2320:2321 */ if (args[0].equalsIgnoreCase("resetchallenge"))
  2321. /* 2321: */ {
  2322. /* 2322:2322 */ UUID uuid = this.plugin.getPlayers().getUUID(args[1]);
  2323. /* 2323:2324 */ if (uuid != null) {
  2324. /* 2324:2325 */ options.addAll(this.plugin.getPlayers().getChallengesDone(uuid));
  2325. /* 2325: */ } else {
  2326. /* 2326:2327 */ options.addAll(this.plugin.getChallenges().getAllChallenges());
  2327. /* 2327: */ }
  2328. /* 2328: */ }
  2329. /* 2329:2330 */ if ((args[0].equalsIgnoreCase("info")) && (args[1].equalsIgnoreCase("challenges"))) {
  2330. /* 2330:2332 */ options.addAll(Util.getOnlinePlayerList());
  2331. /* 2331: */ }
  2332. /* 2332:2334 */ if (args[0].equalsIgnoreCase("setbiome"))
  2333. /* 2333: */ {
  2334. /* 2334:2335 */ Biome[] biomes = Biome.values();
  2335. /* 2335:2336 */ for (Biome b : biomes) {
  2336. /* 2336:2337 */ if (this.plugin.getConfig().contains("biomes." + b.name())) {
  2337. /* 2337:2338 */ options.add(b.name());
  2338. /* 2338: */ }
  2339. /* 2339: */ }
  2340. /* 2340: */ }
  2341. /* 2341:2342 */ if ((args[0].equalsIgnoreCase("team")) && ((args[1].equalsIgnoreCase("add")) || (args[1].equalsIgnoreCase("kick")))) {
  2342. /* 2342:2345 */ options.addAll(Util.getOnlinePlayerList());
  2343. /* 2343: */ }
  2344. /* 2344: */ break;
  2345. /* 2345: */ case 4:
  2346. /* 2346:2349 */ if ((args[0].equalsIgnoreCase("team")) && (args[1].equalsIgnoreCase("add"))) {
  2347. /* 2347:2350 */ options.addAll(Util.getOnlinePlayerList());
  2348. /* 2348: */ }
  2349. /* 2349: */ break;
  2350. /* 2350: */ }
  2351. /* 2351: */ }
  2352. /* 2352: */ else
  2353. /* 2353: */ {
  2354. /* 2354:2354 */ Player player = (Player)sender;
  2355. /* 2355:2356 */ switch (args.length)
  2356. /* 2356: */ {
  2357. /* 2357: */ case 0:
  2358. /* 2358: */ case 1:
  2359. /* 2359:2359 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.reload")) || (player.isOp())) {
  2360. /* 2360:2360 */ options.add("reload");
  2361. /* 2361: */ }
  2362. /* 2362:2362 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.register")) || (player.isOp())) {
  2363. /* 2363:2363 */ options.add("register");
  2364. /* 2364: */ }
  2365. /* 2365:2365 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.unregister")) || (player.isOp())) {
  2366. /* 2366:2366 */ options.add("unregister");
  2367. /* 2367: */ }
  2368. /* 2368:2368 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.reserve")) || (player.isOp())) {
  2369. /* 2369:2369 */ options.add("reserve");
  2370. /* 2370: */ }
  2371. /* 2371:2371 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.delete")) || (player.isOp())) {
  2372. /* 2372:2372 */ options.add("delete");
  2373. /* 2373: */ }
  2374. /* 2374:2374 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.deleteisland")) || (player.isOp())) {
  2375. /* 2375:2375 */ options.add("deleteisland");
  2376. /* 2376: */ }
  2377. /* 2377:2377 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.purge")) || (player.isOp())) {
  2378. /* 2378:2378 */ options.add("purge");
  2379. /* 2379: */ }
  2380. /* 2380:2380 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.topten")) || (player.isOp())) {
  2381. /* 2381:2381 */ options.add("topten");
  2382. /* 2382: */ }
  2383. /* 2383:2383 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.topbreeders")) || (player.isOp())) {
  2384. /* 2384:2384 */ options.add("topbreeders");
  2385. /* 2385: */ }
  2386. /* 2386:2386 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.challenges")) || (player.isOp()))
  2387. /* 2387: */ {
  2388. /* 2388:2387 */ options.add("completechallenge");
  2389. /* 2389:2388 */ options.add("resetchallenge");
  2390. /* 2390:2389 */ options.add("resetallchallenges");
  2391. /* 2391: */ }
  2392. /* 2392:2391 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.info")) || (player.isOp())) {
  2393. /* 2393:2392 */ options.add("info");
  2394. /* 2394: */ }
  2395. /* 2395:2394 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.clearreset")) || (player.isOp())) {
  2396. /* 2396:2395 */ options.add("clearreset");
  2397. /* 2397: */ }
  2398. /* 2398:2397 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.setdeaths")) || (player.isOp())) {
  2399. /* 2399:2398 */ options.add("setdeaths");
  2400. /* 2400: */ }
  2401. /* 2401:2400 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.clearresetall")) || (player.isOp())) {
  2402. /* 2402:2401 */ options.add("clearresetall");
  2403. /* 2403: */ }
  2404. /* 2404:2403 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.setspawn")) || (player.isOp())) {
  2405. /* 2405:2404 */ options.add("setspawn");
  2406. /* 2406: */ }
  2407. /* 2407:2406 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.setrange")) || (player.isOp()))
  2408. /* 2408: */ {
  2409. /* 2409:2407 */ options.add("setrange");
  2410. /* 2410:2408 */ options.add("addrange");
  2411. /* 2411: */ }
  2412. /* 2412:2410 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.tp")) || (player.isOp())) {
  2413. /* 2413:2411 */ options.add("tp");
  2414. /* 2414: */ }
  2415. /* 2415:2413 */ if ((Settings.createNether) && (Settings.newNether) && (ASkyBlock.getNetherWorld() != null) && ((VaultHelper.checkPerm(player, "askyblock.mod.tpnether")) || (player.isOp()))) {
  2416. /* 2416:2414 */ options.add("tpnether");
  2417. /* 2417: */ }
  2418. /* 2418:2417 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.setbiome")) || (player.isOp())) {
  2419. /* 2419:2418 */ options.add("setbiome");
  2420. /* 2420: */ }
  2421. /* 2421:2420 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.team")) || (player.isOp())) {
  2422. /* 2422:2421 */ options.add("team");
  2423. /* 2423: */ }
  2424. /* 2424:2423 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.lock")) || (player.isOp())) {
  2425. /* 2425:2424 */ options.add("lock");
  2426. /* 2426: */ }
  2427. /* 2427:2426 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.signadmin")) || (player.isOp())) {
  2428. /* 2428:2427 */ options.add("resetsign");
  2429. /* 2429: */ }
  2430. /* 2430:2429 */ if (((Settings.teamChat) && (VaultHelper.checkPerm(player, "askyblock.mod.spy"))) || (player.isOp())) {
  2431. /* 2431:2430 */ options.add("spy");
  2432. /* 2432: */ }
  2433. /* 2433: */ break;
  2434. /* 2434: */ case 2:
  2435. /* 2435:2434 */ if ((VaultHelper.checkPerm(player, "askyblock.admin.setrange")) || ((player.isOp()) && ((args[0].equalsIgnoreCase("setrange")) || (args[0].equalsIgnoreCase("addrange"))))) {
  2436. /* 2436:2436 */ options.addAll(Util.getOnlinePlayerList());
  2437. /* 2437: */ }
  2438. /* 2438:2438 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.lock")) || (player.isOp())) && (args[0].equalsIgnoreCase("lock"))) {
  2439. /* 2439:2440 */ options.addAll(Util.getOnlinePlayerList());
  2440. /* 2440: */ }
  2441. /* 2441:2442 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.signadmin")) || (player.isOp())) && (args[0].equalsIgnoreCase("signadmin"))) {
  2442. /* 2442:2444 */ options.addAll(Util.getOnlinePlayerList());
  2443. /* 2443: */ }
  2444. /* 2444:2446 */ if (((VaultHelper.checkPerm(player, "askyblock.admin.unregister")) || (player.isOp())) && (args[0].equalsIgnoreCase("unregister"))) {
  2445. /* 2445:2448 */ options.addAll(Util.getOnlinePlayerList());
  2446. /* 2446: */ }
  2447. /* 2447:2450 */ if (((VaultHelper.checkPerm(player, "askyblock.admin.delete")) || (player.isOp())) && (args[0].equalsIgnoreCase("delete"))) {
  2448. /* 2448:2452 */ options.addAll(Util.getOnlinePlayerList());
  2449. /* 2449: */ }
  2450. /* 2450:2454 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.challenges")) || (player.isOp())) && ((args[0].equalsIgnoreCase("completechallenge")) || (args[0].equalsIgnoreCase("resetchallenge")))) {
  2451. /* 2451:2456 */ options.addAll(Util.getOnlinePlayerList());
  2452. /* 2452: */ }
  2453. /* 2453:2458 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.challenges")) || (player.isOp())) && (args[0].equalsIgnoreCase("resetallchallenges"))) {
  2454. /* 2454:2460 */ options.addAll(Util.getOnlinePlayerList());
  2455. /* 2455: */ }
  2456. /* 2456:2462 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.info")) || (player.isOp())) && (args[0].equalsIgnoreCase("info")))
  2457. /* 2457: */ {
  2458. /* 2458:2464 */ options.add("challenges");
  2459. /* 2459:2465 */ options.addAll(Util.getOnlinePlayerList());
  2460. /* 2460: */ }
  2461. /* 2461:2467 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.clearreset")) || (player.isOp())) && (args[0].equalsIgnoreCase("clearreset"))) {
  2462. /* 2462:2469 */ options.addAll(Util.getOnlinePlayerList());
  2463. /* 2463: */ }
  2464. /* 2464:2471 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.setdeaths")) || (player.isOp())) && (args[0].equalsIgnoreCase("setdeaths"))) {
  2465. /* 2465:2473 */ options.addAll(Util.getOnlinePlayerList());
  2466. /* 2466: */ }
  2467. /* 2467:2475 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.tp")) || (player.isOp())) && ((args[0].equalsIgnoreCase("tp")) || (args[0].equalsIgnoreCase("tpnether")))) {
  2468. /* 2468:2477 */ options.addAll(Util.getOnlinePlayerList());
  2469. /* 2469: */ }
  2470. /* 2470:2479 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.setbiome")) || (player.isOp())) && (args[0].equalsIgnoreCase("setbiome"))) {
  2471. /* 2471:2481 */ options.addAll(Util.getOnlinePlayerList());
  2472. /* 2472: */ }
  2473. /* 2473:2483 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.team")) || (player.isOp())) && (args[0].equalsIgnoreCase("team")))
  2474. /* 2474: */ {
  2475. /* 2475:2485 */ options.add("kick");
  2476. /* 2476:2486 */ options.add("add");
  2477. /* 2477: */ }
  2478. /* 2478: */ break;
  2479. /* 2479: */ case 3:
  2480. /* 2480:2490 */ if ((VaultHelper.checkPerm(player, "askyblock.mod.challenges")) || (player.isOp()))
  2481. /* 2481: */ {
  2482. /* 2482:2491 */ if (args[0].equalsIgnoreCase("completechallenge"))
  2483. /* 2483: */ {
  2484. /* 2484:2492 */ UUID uuid = this.plugin.getPlayers().getUUID(args[1]);
  2485. /* 2485:2494 */ if (uuid != null) {
  2486. /* 2486:2495 */ options.addAll(this.plugin.getPlayers().getChallengesNotDone(uuid));
  2487. /* 2487: */ } else {
  2488. /* 2488:2497 */ options.addAll(this.plugin.getChallenges().getAllChallenges());
  2489. /* 2489: */ }
  2490. /* 2490: */ }
  2491. /* 2491:2500 */ if (args[0].equalsIgnoreCase("resetchallenge"))
  2492. /* 2492: */ {
  2493. /* 2493:2501 */ UUID uuid = this.plugin.getPlayers().getUUID(args[1]);
  2494. /* 2494:2503 */ if (uuid != null) {
  2495. /* 2495:2504 */ options.addAll(this.plugin.getPlayers().getChallengesDone(uuid));
  2496. /* 2496: */ } else {
  2497. /* 2497:2506 */ options.addAll(this.plugin.getChallenges().getAllChallenges());
  2498. /* 2498: */ }
  2499. /* 2499: */ }
  2500. /* 2500: */ }
  2501. /* 2501:2510 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.info")) || (player.isOp())) && (args[0].equalsIgnoreCase("info")) && (args[1].equalsIgnoreCase("challenges"))) {
  2502. /* 2502:2513 */ options.addAll(Util.getOnlinePlayerList());
  2503. /* 2503: */ }
  2504. /* 2504:2515 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.setbiome")) || (player.isOp())) && (args[0].equalsIgnoreCase("setbiome")))
  2505. /* 2505: */ {
  2506. /* 2506:2517 */ Biome[] biomes = Biome.values();
  2507. /* 2507:2518 */ for (Biome b : biomes) {
  2508. /* 2508:2519 */ if (this.plugin.getConfig().contains("biomes." + b.name())) {
  2509. /* 2509:2520 */ options.add(b.name());
  2510. /* 2510: */ }
  2511. /* 2511: */ }
  2512. /* 2512: */ }
  2513. /* 2513:2524 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.team")) || (player.isOp())) && (args[0].equalsIgnoreCase("team")) && ((args[1].equalsIgnoreCase("add")) || (args[1].equalsIgnoreCase("kick")))) {
  2514. /* 2514:2528 */ options.addAll(Util.getOnlinePlayerList());
  2515. /* 2515: */ }
  2516. /* 2516: */ break;
  2517. /* 2517: */ case 4:
  2518. /* 2518:2532 */ if (((VaultHelper.checkPerm(player, "askyblock.mod.team")) || (player.isOp())) && (args[0].equalsIgnoreCase("team")) && (args[1].equalsIgnoreCase("add")))
  2519. /* 2519: */ {
  2520. /* 2520:2535 */ List<Player> players = PlayerCache.getOnlinePlayers();
  2521. /* 2521:2536 */ for (Player p : players) {
  2522. /* 2522:2537 */ options.add(p.getName());
  2523. /* 2523: */ }
  2524. /* 2524: */ }
  2525. /* 2525: */ break;
  2526. /* 2526: */ }
  2527. /* 2527: */ }
  2528. /* 2528:2543 */ return Util.tabLimit(options, lastArg);
  2529. /* 2529: */ }
  2530. /* 2530: */ }
  2531.  
  2532.  
  2533.  
  2534. /* Location: C:\Users\RenΓ©\Downloads\GoPro\askyblock.jar
  2535.  
  2536. * Qualified Name: com.wasteofplastic.askyblock.commands.AdminCmd
  2537.  
  2538. * JD-Core Version: 0.7.0.1
  2539.  
  2540. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement