From 081081b36eade9ab9eb0163a6fc90c6cb2f9349e Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 17 Jun 2016 15:42:23 +1000 Subject: [PATCH] Fixes #1063 --- .../com/plotsquared/bukkit/util/BukkitUtil.java | 12 ++---------- .../java/com/intellectualcrafters/plot/PS.java | 1 + .../intellectualcrafters/plot/object/Plot.java | 15 +++++++++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java index 884103a25..14d8156bd 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java @@ -8,10 +8,11 @@ import com.intellectualcrafters.plot.object.schematic.PlotItem; import com.intellectualcrafters.plot.util.MathMan; import com.intellectualcrafters.plot.util.StringComparison; import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.UUIDHandler; import com.intellectualcrafters.plot.util.WorldUtil; import com.plotsquared.bukkit.object.BukkitPlayer; +import java.util.Arrays; +import java.util.List; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.OfflinePlayer; @@ -32,9 +33,6 @@ import org.bukkit.material.Tree; import org.bukkit.material.WoodenStep; import org.bukkit.material.Wool; -import java.util.Arrays; -import java.util.List; - public class BukkitUtil extends WorldUtil { private static String lastString = null; @@ -136,12 +134,6 @@ public class BukkitUtil extends WorldUtil { sign.setLine(i, lines[i]); } sign.update(true); - TaskManager.runTaskLater(new Runnable() { - @Override - public void run() { - sign.update(true); - } - }, 20); } } diff --git a/Core/src/main/java/com/intellectualcrafters/plot/PS.java b/Core/src/main/java/com/intellectualcrafters/plot/PS.java index f5e877244..3137c2a54 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/PS.java @@ -171,6 +171,7 @@ public class PS { if (Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS) { try { if (this.IMP.initWorldEdit()) { + PS.debug("PlotSquared hooked into WorldEdit."); this.worldedit = WorldEdit.getInstance(); WorldEdit.getInstance().getEventBus().register(new WESubscriber()); new WE_Anywhere(); 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 478086c23..7d2d1a628 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -850,7 +850,7 @@ public class Plot { if (!this.isMerged()) { return false; } - Set plots = this.getConnectedPlots(); + final Set plots = this.getConnectedPlots(); ArrayList ids = new ArrayList<>(plots.size()); for (Plot current : plots) { current.setHome(null); @@ -886,9 +886,16 @@ public class Plot { for (Plot current : plots) { boolean[] merged = new boolean[]{false, false, false, false}; current.setMerged(merged); - if (createSign) { - current.setSign(MainUtil.getName(current.owner)); - } + } + if (createSign) { + GlobalBlockQueue.IMP.addTask(new Runnable() { + @Override + public void run() { + for (Plot current : plots) { + current.setSign(MainUtil.getName(current.owner)); + } + } + }); } if (createRoad) { manager.finishPlotUnlink(this.area, ids);