From f2b050444c9bd162b72366f3115e67f20729948a Mon Sep 17 00:00:00 2001 From: boy0001 Date: Wed, 24 Jun 2015 13:48:23 +1000 Subject: [PATCH] Remove debug --- .../plot/PlotSquared.java | 5 ---- .../plot/commands/Info.java | 29 ++++++++++--------- .../plot/commands/list.java | 12 ++++---- .../plot/util/bukkit/UUIDHandler.java | 5 ---- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java index f72ccacb1..da74d0d26 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java @@ -963,11 +963,6 @@ public class PlotSquared { } Settings.CONSOLE_COLOR = config.getBoolean("console.color"); if (!config.getBoolean("chat.fancy") || !IMP.checkVersion(1, 7, 0)) { - System.out.print("FANCY CHAT ======================================="); - System.out.print("FANCY CHAT ======================================="); - System.out.print("FANCY CHAT ======================================="); - System.out.print(!config.getBoolean("chat.fancy")); - System.out.print(!IMP.checkVersion(1, 7, 0)); Settings.FANCY_CHAT = false; } Settings.METRICS = config.getBoolean("metrics"); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java index 6f57bd1ef..a94c60bf6 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java @@ -56,20 +56,23 @@ public class Info extends SubCommand { public boolean execute(final PlotPlayer player, String... args) { String arg = null; if (args.length > 0) arg = args[0] + ""; - switch (arg) { - case "trusted": - case "alias": - case "biome": - case "denied": - case "flags": - case "id": - case "size": - case "members": - case "owner": - case "rating": - arg = null; + if (arg != null) { + switch (arg) { + case "trusted": + case "alias": + case "inv": + case "biome": + case "denied": + case "flags": + case "id": + case "size": + case "members": + case "owner": + case "rating": + arg = null; + } } - Plot plot = MainUtil.getPlotFromString(player, arg, true); + Plot plot = MainUtil.getPlotFromString(player, arg, false); if (plot == null) { if (player == null) { return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java index e0e1e3b56..448e12579 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -264,7 +264,7 @@ public class list extends SubCommand { if (page > totalPages) { page = totalPages; } - // Only display 12! + // Only display pageSize! int max = (page * pageSize) + pageSize; if (max > plots.size()) { max = plots.size(); @@ -333,8 +333,8 @@ public class list extends SubCommand { .then("[") .color(ChatColor.DARK_GRAY) .then(i + "") - .command("/plot visit " + plot.toString()) - .tooltip("/plot visit " + plot.toString()) + .command("/plot visit " + plot.world + ";" + plot.id) + .tooltip("/plot visit " + plot.world + ";" + plot.id) .color(ChatColor.GOLD) .then("]") @@ -344,7 +344,7 @@ public class list extends SubCommand { .then(" " + plot.toString()) .formattedTooltip(trusted, members, flags) - .command("/plot info " + plot.toString()) + .command("/plot info " + plot.world + ";" + plot.id) .color(color) .then(" - ") @@ -412,7 +412,7 @@ public class list extends SubCommand { .send(((BukkitPlayer) player).player); return; } - if (page == 0) { + if (page == 0 && totalPages != 0) { // next new FancyMessage("") .then("<-") @@ -425,7 +425,7 @@ public class list extends SubCommand { .send(((BukkitPlayer) player).player); return; } - if (page == totalPages) { + if (page == totalPages && totalPages != 0) { // back new FancyMessage("") .then("<-") diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/UUIDHandler.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/UUIDHandler.java index 01a4ce8f5..963950952 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/UUIDHandler.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/UUIDHandler.java @@ -222,24 +222,19 @@ public class UUIDHandler { } public static String getName(final UUID uuid) { - System.out.print(uuid); if (uuid == null) { - System.out.print(1); return null; } // check online final PlotPlayer player = UUIDHandler.getPlayer(uuid); if (player != null) { - System.out.print(2); return player.getName(); } // check cache final StringWrapper name = UUIDHandler.uuidMap.inverse().get(uuid); if (name != null) { - System.out.print(3); return name.value; } - System.out.print(4); return null; }