From dd247a9ee0381838cfc46c96066e51d0d189e8df Mon Sep 17 00:00:00 2001 From: fullwall Date: Tue, 24 Oct 2023 23:10:03 +0800 Subject: [PATCH] Fix typo causing npcs to be damageable --- main/src/main/java/net/citizensnpcs/EventListen.java | 1 + 1 file changed, 1 insertion(+) diff --git a/main/src/main/java/net/citizensnpcs/EventListen.java b/main/src/main/java/net/citizensnpcs/EventListen.java index db72e21a6..5638296c6 100644 --- a/main/src/main/java/net/citizensnpcs/EventListen.java +++ b/main/src/main/java/net/citizensnpcs/EventListen.java @@ -287,6 +287,7 @@ public class EventListen implements Listener { } return; } + event.setCancelled(npc.isProtected()); if (event instanceof EntityDamageByEntityEvent) { NPCDamageByEntityEvent damageEvent = new NPCDamageByEntityEvent(npc, (EntityDamageByEntityEvent) event);