From 089ffe0dfe877e5f848e6fd474b28894448ebb78 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sat, 6 Jul 2024 16:49:10 +0800 Subject: [PATCH] Update tracking range on seen --- .../nms/v1_8_R3/util/PlayerlistTrackerEntry.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java index a1032a8e7..13d2c4455 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java @@ -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); }