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

Dieser Commit ist enthalten in:
Jordan 2022-03-13 17:35:27 +00:00 committet von GitHub
Ursprung d8c0f8e3b1
Commit 5a97b23347
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 21 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -219,6 +219,16 @@ public class NullExtent extends FaweRegionExtent implements IBatchProcessor {
throw reason; throw reason;
} }
@Override
public Extent addProcessor(final IBatchProcessor processor) {
return this;
}
@Override
public Extent addPostProcessor(final IBatchProcessor processor) {
return this;
}
@Override @Override
public BlockArrayClipboard lazyCopy(Region region) { public BlockArrayClipboard lazyCopy(Region region) {
throw reason; throw reason;

Datei anzeigen

@ -19,6 +19,7 @@
package com.sk89q.worldedit.extent; package com.sk89q.worldedit.extent;
import com.fastasyncworldedit.core.queue.IBatchProcessor;
import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.BaseEntity;
@ -118,6 +119,16 @@ public class NullExtent implements Extent {
throws WorldEditException { throws WorldEditException {
return false; return false;
} }
@Override
public Extent addProcessor(final IBatchProcessor processor) {
return this;
}
@Override
public Extent addPostProcessor(final IBatchProcessor processor) {
return this;
}
//FAWE end //FAWE end
@Nullable @Nullable