diff --git a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java index a39431030..b53265ca2 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java +++ b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java @@ -175,11 +175,6 @@ public class CitizensNavigator implements Navigator, Runnable { switchStrategyTo(newStrategy); } - @Override - public void setTarget(LivingEntity target, boolean aggressive) { - setTarget((Entity) target, aggressive); - } - @Override public void setTarget(Location target) { if (!npc.isSpawned()) diff --git a/src/main/java/net/citizensnpcs/npc/skin/SkinUpdateTracker.java b/src/main/java/net/citizensnpcs/npc/skin/SkinUpdateTracker.java index 03b03378b..aaed71631 100644 --- a/src/main/java/net/citizensnpcs/npc/skin/SkinUpdateTracker.java +++ b/src/main/java/net/citizensnpcs/npc/skin/SkinUpdateTracker.java @@ -219,8 +219,10 @@ public class SkinUpdateTracker { for (Player player : players) { if (player.hasMetadata("NPC")) continue; - - double distanceSquared = player.getLocation(CACHE_LOCATION).distanceSquared(location); + Location ploc = player.getLocation(CACHE_LOCATION); + if (ploc.getWorld() != location.getWorld()) + continue; + double distanceSquared = ploc.distanceSquared(location); if (distanceSquared > viewDistance) continue;