Remove debug

This commit is contained in:
boy0001 2015-06-24 13:48:23 +10:00
parent 699906476c
commit f2b050444c
4 changed files with 22 additions and 29 deletions

View File

@ -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");

View File

@ -56,9 +56,11 @@ public class Info extends SubCommand {
public boolean execute(final PlotPlayer player, String... args) {
String arg = null;
if (args.length > 0) arg = args[0] + "";
if (arg != null) {
switch (arg) {
case "trusted":
case "alias":
case "inv":
case "biome":
case "denied":
case "flags":
@ -69,7 +71,8 @@ public class Info extends SubCommand {
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;

View File

@ -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("<-")

View File

@ -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;
}