mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 11:05:49 +01:00
Remove deprecated method and double check world when resetting player skins
This commit is contained in:
parent
73c37eb7db
commit
6085f2233d
@ -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())
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user