From 767a73a4799991ef0c8ae23d260fedaa123dac40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ZX=E5=A4=8F=E5=A4=9C=E4=B9=8B=E9=A3=8E?= Date: Wed, 23 Oct 2024 23:45:01 +0800 Subject: [PATCH] fix: we should cancel the original target event instead of our own version (#3163) --- main/src/main/java/net/citizensnpcs/EventListen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/net/citizensnpcs/EventListen.java b/main/src/main/java/net/citizensnpcs/EventListen.java index 72d32b9f3..7f26a1ca3 100644 --- a/main/src/main/java/net/citizensnpcs/EventListen.java +++ b/main/src/main/java/net/citizensnpcs/EventListen.java @@ -453,7 +453,7 @@ public class EventListen implements Listener { targetNPCEvent.setCancelled(!npc.data().get(NPC.Metadata.TARGETABLE, !npc.isProtected())); Bukkit.getPluginManager().callEvent(targetNPCEvent); if (targetNPCEvent.isCancelled()) { - targetNPCEvent.setCancelled(true); + event.setCancelled(true); } }