mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-28 02:01:35 +01:00
Copy getStoredLocation/getLocation
This commit is contained in:
parent
d8b3b1c2c0
commit
c7ab1a8407
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user