Skip to content

Commit

Permalink
Copy getStoredLocation/getLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jun 28, 2020
1 parent d8b3b1c commit c7ab1a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public Navigator getNavigator() {

@Override
public Location getStoredLocation() {
return isSpawned() ? getEntity().getLocation(CACHE_LOCATION) : getTrait(CurrentLocation.class).getLocation();
return isSpawned() ? getEntity().getLocation() : getTrait(CurrentLocation.class).getLocation();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public float getBodyYaw() {
}

public Location getLocation() {
return location.getWorld() == null ? null : location;
return location.getWorld() == null ? null : location.clone();
}

@Override
Expand Down

0 comments on commit c7ab1a8

Please sign in to comment.