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