From f3f8fceb6c2b019aa5928d12b6b5f95c5eee7b3e Mon Sep 17 00:00:00 2001 From: fullwall Date: Sat, 12 May 2012 15:18:04 +0800 Subject: [PATCH] Use new constructor --- src/main/java/net/citizensnpcs/EventListen.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/citizensnpcs/EventListen.java b/src/main/java/net/citizensnpcs/EventListen.java index 3b23a0782..83319b62f 100644 --- a/src/main/java/net/citizensnpcs/EventListen.java +++ b/src/main/java/net/citizensnpcs/EventListen.java @@ -90,9 +90,8 @@ public class EventListen implements Listener { EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event; NPC npc = npcManager.getNPC(event.getEntity()); - NPCDamageEvent damageEvent = new NPCDamageEvent(npc, e.getDamager()); + NPCDamageEvent damageEvent = new NPCDamageEvent(npc, e); Bukkit.getPluginManager().callEvent(event); - event.setCancelled(damageEvent.isCancelled()); if (!damageEvent.isCancelled() || !(e.getDamager() instanceof Player)) return;