From cb342de934b1515198468a0a3c9854b9ed51748e Mon Sep 17 00:00:00 2001 From: SirYwell Date: Fri, 4 Jun 2021 13:38:48 +0200 Subject: [PATCH] Check merge status from correct plot --- .../core/plot/PlotModificationManager.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java index 27b3185bf..4ba41a9c1 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java @@ -569,7 +569,7 @@ public final class PlotModificationManager { } visited.add(current); Set plots; - if ((dir == Direction.ALL || dir == Direction.NORTH) && !this.plot.isMerged(Direction.NORTH)) { + if ((dir == Direction.ALL || dir == Direction.NORTH) && !current.isMerged(Direction.NORTH)) { Plot other = current.getRelative(Direction.NORTH); if (other != null && other.isOwner(uuid) && (other.getBasePlot(false).equals(current.getBasePlot(false)) || (plots = other.getConnectedPlots()).size() <= max && frontier.addAll(plots) && (max -= plots.size()) != -1)) { @@ -603,7 +603,7 @@ public final class PlotModificationManager { } } } - if (max >= 0 && (dir == Direction.ALL || dir == Direction.SOUTH) && !this.plot.isMerged(Direction.SOUTH)) { + if (max >= 0 && (dir == Direction.ALL || dir == Direction.SOUTH) && !current.isMerged(Direction.SOUTH)) { Plot other = current.getRelative(Direction.SOUTH); if (other != null && other.isOwner(uuid) && (other.getBasePlot(false).equals(current.getBasePlot(false)) || (plots = other.getConnectedPlots()).size() <= max && frontier.addAll(plots) && (max -= plots.size()) != -1)) { @@ -620,7 +620,7 @@ public final class PlotModificationManager { } } } - if (max >= 0 && (dir == Direction.ALL || dir == Direction.WEST) && !this.plot.isMerged(Direction.WEST)) { + if (max >= 0 && (dir == Direction.ALL || dir == Direction.WEST) && !current.isMerged(Direction.WEST)) { Plot other = current.getRelative(Direction.WEST); if (other != null && other.isOwner(uuid) && (other.getBasePlot(false).equals(current.getBasePlot(false)) || (plots = other.getConnectedPlots()).size() <= max && frontier.addAll(plots) && (max -= plots.size()) != -1)) { @@ -637,12 +637,12 @@ public final class PlotModificationManager { } } } - if (actor != null && Settings.QUEUE.NOTIFY_PROGRESS) { - queue.addProgressSubscriber(subscriberFactory.createWithActor(actor)); - } - if (queue.size() > 0) { - queue.enqueue(); - } + } + if (actor != null && Settings.QUEUE.NOTIFY_PROGRESS) { + queue.addProgressSubscriber(subscriberFactory.createWithActor(actor)); + } + if (queue.size() > 0) { + queue.enqueue(); } return toReturn; }