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);
|
switchStrategyTo(newStrategy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setTarget(LivingEntity target, boolean aggressive) {
|
|
||||||
setTarget((Entity) target, aggressive);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setTarget(Location target) {
|
public void setTarget(Location target) {
|
||||||
if (!npc.isSpawned())
|
if (!npc.isSpawned())
|
||||||
|
@ -219,8 +219,10 @@ public class SkinUpdateTracker {
|
|||||||
for (Player player : players) {
|
for (Player player : players) {
|
||||||
if (player.hasMetadata("NPC"))
|
if (player.hasMetadata("NPC"))
|
||||||
continue;
|
continue;
|
||||||
|
Location ploc = player.getLocation(CACHE_LOCATION);
|
||||||
double distanceSquared = player.getLocation(CACHE_LOCATION).distanceSquared(location);
|
if (ploc.getWorld() != location.getWorld())
|
||||||
|
continue;
|
||||||
|
double distanceSquared = ploc.distanceSquared(location);
|
||||||
if (distanceSquared > viewDistance)
|
if (distanceSquared > viewDistance)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user