mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-28 05:35:45 +01:00
Use new constructor
This commit is contained in:
parent
f8cec0710f
commit
f3f8fceb6c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user