Don't use ignoreCancelled on entitytarget/damage

This commit is contained in:
fullwall 2012-08-31 22:19:04 +08:00
parent 54a2527534
commit 1b3d81f019

View File

@ -79,7 +79,7 @@ public class EventListen implements Listener {
/* /*
* Entity events * Entity events
*/ */
@EventHandler(ignoreCancelled = true) @EventHandler
public void onEntityDamage(EntityDamageEvent event) { public void onEntityDamage(EntityDamageEvent event) {
if (!npcRegistry.isNPC(event.getEntity())) if (!npcRegistry.isNPC(event.getEntity()))
return; return;
@ -113,7 +113,7 @@ public class EventListen implements Listener {
npc.despawn(); npc.despawn();
} }
@EventHandler(ignoreCancelled = true) @EventHandler
public void onEntityTarget(EntityTargetEvent event) { public void onEntityTarget(EntityTargetEvent event) {
if (!npcRegistry.isNPC(event.getEntity()) || !(event.getTarget() instanceof Player)) if (!npcRegistry.isNPC(event.getEntity()) || !(event.getTarget() instanceof Player))
return; return;