From 1d9ad9482264d263782c62d61f8a09a414bdaa40 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 10 Nov 2019 14:01:12 +0000 Subject: [PATCH] Fix plot getRegions off by 1 --- .../plotsquared/plot/object/Plot.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java index 33e482428..67fe23387 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java @@ -879,10 +879,10 @@ public class Plot { @Override public void run() { if (queue.isEmpty()) { Runnable run = () -> { -// for (CuboidRegion region : regions) { -// Location[] corners = MainUtil.getCorners(getWorldName(), region); -// ChunkManager.manager.clearAllEntities(corners[0], corners[1]); -// } + for (CuboidRegion region : regions) { + Location[] corners = MainUtil.getCorners(getWorldName(), region); + ChunkManager.manager.clearAllEntities(corners[0], corners[1]); + } TaskManager.runTask(whenDone); }; for (Plot current : plots) { @@ -2710,7 +2710,7 @@ public class Plot { BlockVector3 pos2 = BlockVector3.at(toploc.getX(), Plot.MAX_HEIGHT - 1, topabs.getZ()); regions.add(new CuboidRegion(pos1, pos2)); if (plot.getMerged(Direction.SOUTHEAST)) { - pos1 = BlockVector3.at(topabs.getX() + 1, 0, topabs.getZ()); + pos1 = BlockVector3.at(topabs.getX() + 1, 0, topabs.getZ() + 1); pos2 = BlockVector3.at(toploc.getX(), Plot.MAX_HEIGHT - 1, toploc.getZ()); regions.add( new CuboidRegion(pos1, pos2));