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 b7e2753a3..4d1bde24d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -386,7 +386,9 @@ public class EditSession implements Extent, AutoCloseable { * Returns queue status. * * @return whether the queue is enabled + * @deprecated Use {@link EditSession#getReorderMode()} with MULTI_STAGE instead. */ + @Deprecated public boolean isQueueEnabled() { return reorderMode == ReorderMode.MULTI_STAGE && reorderExtent.isEnabled(); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/ChunkBatchingExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/ChunkBatchingExtent.java index 4379a0550..daeb9f0e6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/ChunkBatchingExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/ChunkBatchingExtent.java @@ -73,7 +73,7 @@ public class ChunkBatchingExtent extends AbstractDelegateExtent { } public boolean commitRequired() { - return enabled && batches.size() > 0; + return enabled; } @Override @@ -88,7 +88,7 @@ public class ChunkBatchingExtent extends AbstractDelegateExtent { @Override protected Operation commitBefore() { - if (!enabled) { + if (!commitRequired()) { return null; } return new Operation() { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java index f58161b7c..aa1694740 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java @@ -199,7 +199,7 @@ public class MultiStageReorder extends AbstractDelegateExtent implements Reorder } public boolean commitRequired() { - return enabled && stages.values().stream().anyMatch(stage -> stage.size() > 0); + return enabled; } /** @@ -248,7 +248,7 @@ public class MultiStageReorder extends AbstractDelegateExtent implements Reorder @Override public Operation commitBefore() { - if (!enabled) { + if (!commitRequired()) { return null; } List operations = new ArrayList<>(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java index 08ecaeaf1..5b92a8ad3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/FastModeExtent.java @@ -114,12 +114,12 @@ public class FastModeExtent extends AbstractDelegateExtent { } public boolean commitRequired() { - return (enabled && !dirtyChunks.isEmpty()) || (postEditSimulation && !positions.isEmpty()); + return enabled || postEditSimulation; } @Override protected Operation commitBefore() { - if (!enabled && !postEditSimulation) { + if (!commitRequired()) { return null; } return new Operation() {