From 7a549ce211dd7a440fead859b1128e8c2d3a6c32 Mon Sep 17 00:00:00 2001 From: NuclearW Date: Thu, 8 Mar 2012 13:22:14 -0500 Subject: [PATCH] Return after we cancel an event For EntityDamageByEntity and EntityDamage --- .../com/gmail/nossr50/listeners/mcEntityListener.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java index d753a6f16..55e1dc535 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java @@ -60,8 +60,10 @@ public class mcEntityListener implements Listener { if(!defender.getWorld().getPVP()) return; - if(Party.getInstance().inSameParty((Player)defender, (Player)attacker)) + if(Party.getInstance().inSameParty((Player)defender, (Player)attacker)) { event.setCancelled(true); + return; + } } //Make sure defender is not invincible @@ -91,8 +93,10 @@ public class mcEntityListener implements Listener */ Player player = (Player) entity; PlayerProfile PP = Users.getProfile(player); - if(PP.getGodMode()) - event.setCancelled(true); + if(PP.getGodMode()) { + event.setCancelled(true); + return; + } if(!m.isInvincible(player, event)) {