Update tracking range on seen

This commit is contained in:
fullwall 2024-07-06 16:49:10 +08:00
parent 0ac2d3693a
commit 089ffe0dfe

View File

@ -119,6 +119,11 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled())
return;
Integer trackingRange = npc.data().get(NPC.Metadata.TRACKING_RANGE);
if (trackingRange != null && npc.data().get("last-tracking-range", -1) != b) {
b = trackingRange;
npc.data().set("last-tracking-range", trackingRange);
}
}
super.updatePlayer(entityplayer);
}