mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-28 05:35:45 +01:00
Fix typo
This commit is contained in:
parent
4cd729ae20
commit
41ddb6851b
@ -89,14 +89,12 @@ public class EventListen implements Listener {
|
||||
|
||||
NPC npc = npcManager.getNPC(event.getEntity());
|
||||
if (event instanceof EntityDamageByEntityEvent) {
|
||||
EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event;
|
||||
NPCDamageByEntityEvent damageEvent = new NPCDamageByEntityEvent(npc, (EntityDamageByEntityEvent) event);
|
||||
Bukkit.getPluginManager().callEvent(damageEvent);
|
||||
|
||||
NPCDamageByEntityEvent damageEvent = new NPCDamageByEntityEvent(npc, e);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
||||
if (!damageEvent.isCancelled() || !(e.getDamager() instanceof Player))
|
||||
if (!damageEvent.isCancelled() || !(damageEvent.getDamager() instanceof Player))
|
||||
return;
|
||||
Player damager = (Player) e.getDamager();
|
||||
Player damager = (Player) damageEvent.getDamager();
|
||||
|
||||
// Call left-click event
|
||||
NPCLeftClickEvent leftClickEvent = new NPCLeftClickEvent(npc, damager);
|
||||
|
Loading…
Reference in New Issue
Block a user