Remove deprecated method and double check world when resetting player skins

This commit is contained in:
fullwall 2015-12-19 14:43:56 +08:00
parent 73c37eb7db
commit 6085f2233d
2 changed files with 4 additions and 7 deletions

View File

@ -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())

View File

@ -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;