From 5a97b23347a5e48ebb56efc1fa26692fca4ac913 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sun, 13 Mar 2022 17:35:27 +0000 Subject: [PATCH] Don't error when adding processors to NullExtent, simply do nothing (#1654) --- .../fastasyncworldedit/core/extent/NullExtent.java | 10 ++++++++++ .../java/com/sk89q/worldedit/extent/NullExtent.java | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java index 92c81394a..07a9c4a49 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/NullExtent.java @@ -219,6 +219,16 @@ public class NullExtent extends FaweRegionExtent implements IBatchProcessor { throw reason; } + @Override + public Extent addProcessor(final IBatchProcessor processor) { + return this; + } + + @Override + public Extent addPostProcessor(final IBatchProcessor processor) { + return this; + } + @Override public BlockArrayClipboard lazyCopy(Region region) { throw reason; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/NullExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/NullExtent.java index 0d044d8a4..6c51714c4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/NullExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/NullExtent.java @@ -19,6 +19,7 @@ package com.sk89q.worldedit.extent; +import com.fastasyncworldedit.core.queue.IBatchProcessor; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.entity.BaseEntity; @@ -118,6 +119,16 @@ public class NullExtent implements Extent { throws WorldEditException { return false; } + + @Override + public Extent addProcessor(final IBatchProcessor processor) { + return this; + } + + @Override + public Extent addPostProcessor(final IBatchProcessor processor) { + return this; + } //FAWE end @Nullable