Double check world in skin packet tracker

This commit is contained in:
fullwall 2016-02-29 00:15:00 +08:00
parent feae637824
commit 9e4274516a

View File

@ -183,10 +183,11 @@ public class SkinPacketTracker {
if (player == null || player.hasMetadata("NPC"))
continue;
if (!player.canSee(from))
player.getLocation(CACHE_LOCATION);
if (!player.canSee(from) || !location.getWorld().equals(CACHE_LOCATION.getWorld()))
continue;
if (location.distanceSquared(player.getLocation(CACHE_LOCATION)) > radius)
if (location.distanceSquared(CACHE_LOCATION) > radius)
continue;
updateViewer(player);