Added a method to teleport entities across worlds.

This commit is contained in:
Matthew Miller
2018-12-21 16:56:10 +10:00
parent b300c21185
commit c949b07df1
14 changed files with 287 additions and 2 deletions

View File

@ -110,6 +110,12 @@ public class ChangeSetExtent extends AbstractDelegateExtent {
return entity.getLocation();
}
@Override
public boolean setLocation(Location location) {
// TODO Add a changeset for this.
return entity.setLocation(location);
}
@Override
public Extent getExtent() {
return entity.getExtent();

View File

@ -68,6 +68,11 @@ abstract class StoredEntity implements Entity {
return location;
}
@Override
public boolean setLocation(Location location) {
throw new IllegalArgumentException("StoredEntities are immutable");
}
@Override
public Extent getExtent() {
return location.getExtent();