Implement NPC#getStoredLocation

This commit is contained in:
fullwall 2013-06-01 16:11:55 +08:00
parent a47e05728a
commit 34c61dcc07

View File

@ -84,6 +84,11 @@ public class CitizensNPC extends AbstractNPC {
return navigator;
}
@Override
public Location getStoredLocation() {
return isSpawned() ? getBukkitEntity().getLocation() : getTrait(CurrentLocation.class).getLocation();
}
@Override
public boolean isSpawned() {
return getBukkitEntity() != null;