mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-16 12:21:25 +01:00
fix: we should cancel the original target event instead of our own version (#3163)
This commit is contained in:
parent
4d1b5a79b7
commit
767a73a479
@ -453,7 +453,7 @@ public class EventListen implements Listener {
|
|||||||
targetNPCEvent.setCancelled(!npc.data().get(NPC.Metadata.TARGETABLE, !npc.isProtected()));
|
targetNPCEvent.setCancelled(!npc.data().get(NPC.Metadata.TARGETABLE, !npc.isProtected()));
|
||||||
Bukkit.getPluginManager().callEvent(targetNPCEvent);
|
Bukkit.getPluginManager().callEvent(targetNPCEvent);
|
||||||
if (targetNPCEvent.isCancelled()) {
|
if (targetNPCEvent.isCancelled()) {
|
||||||
targetNPCEvent.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user