Don't error when adding processors to NullExtent, simply do nothing (#1654)

This commit is contained in:
Jordan 2022-03-13 17:35:27 +00:00 committed by GitHub
parent d8c0f8e3b1
commit 5a97b23347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -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;

View File

@ -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