diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java index 2ead8a81f..edd471e5b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java @@ -173,11 +173,19 @@ public class PlotSquared { ArrayList newPlots = new ArrayList<>(); HashMap worldPlots = PlotSquared.plots.get(priorityWorld); if (worldPlots != null) { - newPlots.addAll(sortPlots(worldPlots.values())); + for (Plot plot : sortPlots(worldPlots.values())) { + if (plots.contains(plot)) { + newPlots.add(plot); + } + } } for (Entry> entry : PlotSquared.plots.entrySet()) { if (!entry.getKey().equals(priorityWorld)) { - entry.getValue().values(); + for (Plot plot : entry.getValue().values()) { + if (plots.contains(plot)) { + newPlots.add(plot); + } + } } } return newPlots; @@ -504,18 +512,20 @@ public class PlotSquared { // Set chunk ChunkManager.manager = IMP.initChunkManager(); // PlotMe - TaskManager.runTaskLater(new Runnable() { - @Override - public void run() { - if (IMP.initPlotMeConverter()) { - log("&c=== IMPORTANT ==="); - log("&cTHIS MESSAGE MAY BE EXTREMELY HELPFUL IF YOU HAVE TROUBLE CONVERTING PLOTME!"); - log("&c - Make sure 'UUID.read-from-disk' is disabled (false)!"); - log("&c - Sometimes the database can be locked, deleting PlotMe.jar beforehand will fix the issue!"); - log("&c - After the conversion is finished, please set 'plotme-convert.enabled' to false in the 'settings.yml@'"); + if (Settings.CONVERT_PLOTME) { + TaskManager.runTaskLater(new Runnable() { + @Override + public void run() { + if (IMP.initPlotMeConverter()) { + log("&c=== IMPORTANT ==="); + log("&cTHIS MESSAGE MAY BE EXTREMELY HELPFUL IF YOU HAVE TROUBLE CONVERTING PLOTME!"); + log("&c - Make sure 'UUID.read-from-disk' is disabled (false)!"); + log("&c - Sometimes the database can be locked, deleting PlotMe.jar beforehand will fix the issue!"); + log("&c - After the conversion is finished, please set 'plotme-convert.enabled' to false in the 'settings.yml@'"); + } } - } - }, 200); + }, 200); + } if (Settings.AUTO_CLEAR) { ExpireManager.runTask(); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java index 0c8c4ff4d..8ba3ee56f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java @@ -47,6 +47,7 @@ public class DebugRoadRegen extends SubCommand { MainUtil.update(loc); } MainUtil.sendMessage(player, "&6Regenerating chunk: " + chunk.x + "," + chunk.z + "\n&6 - Result: " + (result == true ? "&aSuccess" : "&cFailed")); + MainUtil.update(loc); return true; } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java index ec3c16b65..6a3e13d11 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java @@ -81,7 +81,7 @@ public class Home extends SubCommand { MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(id - 1)); return true; } else { - MainUtil.sendMessage(plr, C.NO_PLOTS); + MainUtil.sendMessage(plr, C.FOUND_NO_PLOTS); return true; } } 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 b47a9ae79..d563738d9 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -113,16 +113,19 @@ public class list extends SubCommand { break; } plots = PlotSquared.getPlots(plr); + break; } case "shared": { if (plr == null) { break; } + plots = new ArrayList(); for (Plot plot : PlotSquared.getPlots()) { if (plot.helpers.contains(plr.getUUID()) || plot.trusted.contains(plr.getUUID())) { plots.add(plot); } } + break; } case "world": { plots = PlotSquared.getPlots(world).values(); @@ -185,7 +188,7 @@ public class list extends SubCommand { } if (plots.size() == 0) { - MainUtil.sendMessage(plr, C.NO_PLOTS); + MainUtil.sendMessage(plr, C.FOUND_NO_PLOTS); return false; }