From 0093f769f03e8a28ef3179586765b0cd0db611e8 Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 12 Mar 2012 03:26:39 -0400 Subject: [PATCH] Fixed issue with Acrobatics Dodge checks. --- src/main/java/com/gmail/nossr50/skills/Acrobatics.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Acrobatics.java b/src/main/java/com/gmail/nossr50/skills/Acrobatics.java index aca38c0e0..b5a5ea1e9 100644 --- a/src/main/java/com/gmail/nossr50/skills/Acrobatics.java +++ b/src/main/java/com/gmail/nossr50/skills/Acrobatics.java @@ -78,13 +78,16 @@ public class Acrobatics { public static void dodgeChecks(EntityDamageByEntityEvent event) { final int DODGE_MODIFIER = 120; - Player attacker = (Player) event.getDamager(); Player defender = (Player) event.getEntity(); PlayerProfile PPd = Users.getProfile(defender); /* PARTY CHECK */ - if (Party.getInstance().inSameParty(defender, attacker)) { - return; + if (event.getDamager() instanceof Player) { + Player attacker = (Player) event.getDamager(); + + if (Party.getInstance().inSameParty(defender, attacker)) { + return; + } } if (mcPermissions.getInstance().acrobatics(defender)) {