Copy getStoredLocation/getLocation

This commit is contained in:
fullwall 2020-06-28 18:05:04 +08:00
parent d8b3b1c2c0
commit c7ab1a8407
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ public class CitizensNPC extends AbstractNPC {
@Override @Override
public Location getStoredLocation() { public Location getStoredLocation() {
return isSpawned() ? getEntity().getLocation(CACHE_LOCATION) : getTrait(CurrentLocation.class).getLocation(); return isSpawned() ? getEntity().getLocation() : getTrait(CurrentLocation.class).getLocation();
} }
@Override @Override

View File

@ -27,7 +27,7 @@ public class CurrentLocation extends Trait {
} }
public Location getLocation() { public Location getLocation() {
return location.getWorld() == null ? null : location; return location.getWorld() == null ? null : location.clone();
} }
@Override @Override