From 0667e885dec36ae6bd27e0786cb326298beb8a9b Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 31 Jul 2015 15:40:53 +1000 Subject: [PATCH] Some fixes --- src/main/java/com/intellectualcrafters/plot/PS.java | 8 +++++++- .../plot/commands/MainCommand.java | 13 ++++++++++++- .../com/intellectualcrafters/plot/commands/Set.java | 2 +- .../intellectualcrafters/plot/config/Settings.java | 2 +- .../intellectualcrafters/plot/util/MainUtil.java | 2 +- .../java/com/plotsquared/bukkit/BukkitMain.java | 2 +- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/intellectualcrafters/plot/PS.java b/src/main/java/com/intellectualcrafters/plot/PS.java index be60c6b81..57ce21d7e 100644 --- a/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/src/main/java/com/intellectualcrafters/plot/PS.java @@ -182,7 +182,13 @@ public class PS { } // create UUIDWrapper UUIDHandler.implementation = IMP.initUUIDHandler(); - UUIDHandler.startCaching(null); // TODO maybe a notification when this is done? + TaskManager.runTaskLater(new Runnable() { + @Override + public void run() { + PS.debug("Starting UUID caching"); + UUIDHandler.startCaching(null); + } + }, 20); // create event util class EventUtil.manager = IMP.initEventUtil(); // create Hybrid utility class diff --git a/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index 027341746..00520dcd3 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -27,6 +27,7 @@ import java.util.List; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.ConsolePlayer; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; @@ -62,12 +63,13 @@ public class MainCommand extends CommandManager { createCommand(new Buy()); createCommand(new Save()); createCommand(new Load()); + createCommand(new Unclaim()); + createCommand(new Confirm()); createCommand(new Template()); createCommand(new Download()); createCommand(new Update()); createCommand(new Template()); createCommand(new Setup()); -// createCommand(new DebugUUID()); createCommand(new DebugFill()); createCommand(new DebugSaveTest()); createCommand(new DebugLoadTest()); @@ -121,6 +123,15 @@ public class MainCommand extends CommandManager { createCommand(new Condense()); createCommand(new Copy()); createCommand(new Chat()); + createCommand(new Trim()); + + if (Settings.ENABLE_CLUSTERS) { + createCommand(new Cluster()); + } + + // Broken +// createCommand(new DebugUUID()); + } public static boolean no_permission(final PlotPlayer player, final String permission) { diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/src/main/java/com/intellectualcrafters/plot/commands/Set.java index 95527208b..29f796ef1 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -357,7 +357,7 @@ public class Set extends SubCommand { a.append(" ").append(args[x]); } } - MainCommand.onCommand(plr, "flag", ("set " + args[0] + a.toString()).split(" ")); + MainCommand.onCommand(plr, "plot", ("flag set " + args[0] + a.toString()).split(" ")); return true; } } diff --git a/src/main/java/com/intellectualcrafters/plot/config/Settings.java b/src/main/java/com/intellectualcrafters/plot/config/Settings.java index 394d9f22d..fdd96da12 100644 --- a/src/main/java/com/intellectualcrafters/plot/config/Settings.java +++ b/src/main/java/com/intellectualcrafters/plot/config/Settings.java @@ -179,7 +179,7 @@ public class Settings { */ public static boolean TWIN_MODE_UUID = false; public static boolean OFFLINE_MODE = false; - public static boolean UUID_LOWERCASE = true; + public static boolean UUID_LOWERCASE = false; /** * Command confirmation */ diff --git a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java index 7d03e36c0..f66af5317 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java +++ b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java @@ -1083,7 +1083,7 @@ public class MainUtil { public void run() { ChunkLoc loc = new ChunkLoc(value[0], value[1]); ChunkManager.manager.loadChunk(plot.world, loc, false); - setBiome(plot.world, value[2], value[3], value[4], value[4], biome); + setBiome(plot.world, value[2], value[3], value[4], value[5], biome); ChunkManager.manager.unloadChunk(plot.world, loc, true, true); } }, new Runnable() { diff --git a/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/src/main/java/com/plotsquared/bukkit/BukkitMain.java index 18f2404d9..eed6eda2b 100644 --- a/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -464,7 +464,7 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain { AbstractTitle.TITLE_CLASS = new DefaultTitle(); if (wrapper instanceof DefaultUUIDWrapper) { Settings.TWIN_MODE_UUID = true; - } else if (wrapper instanceof OfflineUUIDWrapper && !Bukkit.getOnlineMode()) { + } else if (wrapper.getClass() == OfflineUUIDWrapper.class && !Bukkit.getOnlineMode()) { Settings.TWIN_MODE_UUID = true; } }