From c6ce0c773ffb2032ca63f9ef992740bf4dddc51b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 23 Apr 2019 23:49:45 +1000 Subject: [PATCH] Fixes #30 --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index 508c0dd8a..e1202cf06 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -530,7 +530,13 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue, this.extent = nullExtent; bypassAll = nullExtent; dequeue(); - queue.clear(); + if (!queue.isEmpty()) { + if (Fawe.isMainThread()) { + queue.clear(); + } else { + SetQueue.IMP.addTask(() -> queue.clear()); + } + } return true; }