From 20b73dcc84d27a717aa48a3c6022c068173a4494 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 22 Jun 2012 09:47:18 -0400 Subject: [PATCH] Fixed not checking if an Entity was a LivingEntity before applying the Counter-Attack ability. --- src/main/java/com/gmail/nossr50/util/Combat.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/Combat.java b/src/main/java/com/gmail/nossr50/util/Combat.java index 1150a3f4e..8a3e7ddc9 100644 --- a/src/main/java/com/gmail/nossr50/util/Combat.java +++ b/src/main/java/com/gmail/nossr50/util/Combat.java @@ -209,7 +209,9 @@ public class Combat { } if (configInstance.getSwordsPVE() && !(damager instanceof Player)) { - swordsManager.counterAttackChecks((LivingEntity) damager, event.getDamage()); + if (damager instanceof LivingEntity) { + swordsManager.counterAttackChecks((LivingEntity) damager, event.getDamage()); + } } if (configInstance.getAcrobaticsPVP() && damager instanceof Player) {