diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java index e8b300ef3..ed425373f 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java @@ -288,6 +288,7 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap // Set the result data result.result = new short[16][]; result.result_data = new byte[16][]; + result.grid = grid; // Catch any exceptions (as exceptions usually thrown try { // Fill the result data diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Auto.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Auto.java index e44c9cbbc..0883d79c4 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Auto.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Auto.java @@ -116,6 +116,7 @@ public class Auto extends SubCommand { if ((diff + (size_x * size_z)) > 0) { if (diff < 0) { MainUtil.sendMessage(plr, C.CANT_CLAIM_MORE_PLOTS_NUM, (-diff) + ""); + return false; } else if (plr.hasPersistentMeta("grantedPlots")) { int grantedPlots = ByteArrayUtilities.bytesToInteger(plr.getPersistentMeta("grantedPlots")); if (grantedPlots - diff < size_x * size_z) { @@ -133,6 +134,7 @@ public class Auto extends SubCommand { } } else { MainUtil.sendMessage(plr, C.CANT_CLAIM_MORE_PLOTS); + return false; } } if ((EconHandler.manager != null) && plotarea.USE_ECONOMY) { diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java index ea5f96279..0be644775 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -769,25 +769,30 @@ public class Plot { final Runnable run = new Runnable() { @Override public void run() { - if (finished.incrementAndGet() >= plots.size()) { - for (final RegionWrapper region : regions) { - final Location[] corners = region.getCorners(Plot.this.area.worldname); - ChunkManager.manager.clearAllEntities(corners[0], corners[1]); - } - TaskManager.runTask(whenDone); + for (final RegionWrapper region : regions) { + final Location[] corners = region.getCorners(Plot.this.area.worldname); + ChunkManager.manager.clearAllEntities(corners[0], corners[1]); } + TaskManager.runTask(whenDone); } }; if (isDelete) { for (final Plot current : plots) { - manager.unclaimPlot(Plot.this.area, current, run); + manager.unclaimPlot(Plot.this.area, current, new Runnable() { + @Override + public void run() { + if (finished.incrementAndGet() >= plots.size()) { + run.run(); + } + } + }); } } else { for (final Plot current : plots) { manager.claimPlot(Plot.this.area, current); } + SetQueue.IMP.addTask(run); } - SetQueue.IMP.addTask(run); return; } final Plot current = queue.poll(); diff --git a/target/PlotSquared-Bukkit.jar b/target/PlotSquared-Bukkit.jar index ea1a4c834..1d10df23b 100644 Binary files a/target/PlotSquared-Bukkit.jar and b/target/PlotSquared-Bukkit.jar differ