added missing entity functions; all or nothing; and nothing did not work

This commit is contained in:
wea_ondara 2020-07-27 23:51:26 +02:00
parent 84d2c8f2ce
commit 24fbd21ff1

View File

@ -150,6 +150,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.regions.Regions.asFlatRegion;
import static com.sk89q.worldedit.regions.Regions.maximumBlockY;
import static com.sk89q.worldedit.regions.Regions.minimumBlockY;
import java.util.UUID;
/**
* An {@link Extent} that handles history, {@link BlockBag}s, change limits,
@ -3088,6 +3089,11 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
return false;
}
@Override
public List<? extends Entity> getEntities() {
return world.getEntities();
}
@Override
public List<? extends Entity> getEntities(Region region) {
return world.getEntities(region);
@ -3101,4 +3107,14 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
throw new RuntimeException("Unexpected exception", e);
}
}
@Override
public void removeEntity(int x, int y, int z, UUID uuid)
{
try {
this.getExtent().removeEntity(x, y, z, uuid);
} catch (WorldEditException e) {
throw new RuntimeException("Unexpected exception", e);
}
}
}