mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-27 17:52:03 +01:00
Copy getStoredLocation/getLocation
This commit is contained in:
parent
d8b3b1c2c0
commit
c7ab1a8407
@ -137,7 +137,7 @@ public class CitizensNPC extends AbstractNPC {
|
||||
|
||||
@Override
|
||||
public Location getStoredLocation() {
|
||||
return isSpawned() ? getEntity().getLocation(CACHE_LOCATION) : getTrait(CurrentLocation.class).getLocation();
|
||||
return isSpawned() ? getEntity().getLocation() : getTrait(CurrentLocation.class).getLocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,7 +27,7 @@ public class CurrentLocation extends Trait {
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
return location.getWorld() == null ? null : location;
|
||||
return location.getWorld() == null ? null : location.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user