From 2335708e115d9d5375cef218a8a4f48405a87eff Mon Sep 17 00:00:00 2001 From: boy0001 Date: Thu, 16 Apr 2015 21:28:55 +1000 Subject: [PATCH] This may also be useful --- .../plot/util/bukkit/DebugSetBlockQueue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/DebugSetBlockQueue.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/DebugSetBlockQueue.java index 63bb91970..fc0d3e192 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/DebugSetBlockQueue.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/DebugSetBlockQueue.java @@ -19,7 +19,7 @@ public class DebugSetBlockQueue { this.allocate = t; } - public DebugSetBlockQueue() { + public DebugSetBlockQueue(final Runnable whenDone) { blocks = new HashMap<>(); TaskManager.index.increment(); final int current = TaskManager.index.intValue(); @@ -29,6 +29,7 @@ public class DebugSetBlockQueue { if (blocks.size() == 0) { blocks = null; Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(current)); + TaskManager.runTask(whenDone); return; } long start = System.currentTimeMillis() + allocate;