Kaynağa Gözat

Fixed not checking if an Entity was a LivingEntity before applying the
Counter-Attack ability.

GJ 13 yıl önce
ebeveyn
işleme
20b73dcc84

+ 3 - 1
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) {