Explorar o código

Null check. Fixes #2840 #2842

t00thpick1 %!s(int64=9) %!d(string=hai) anos
pai
achega
d1cf08c6ba
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/main/java/com/gmail/nossr50/skills/axes/Axes.java

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/axes/Axes.java

@@ -25,7 +25,7 @@ public class Axes {
 
     protected static boolean hasArmor(LivingEntity target) {
         for (ItemStack itemStack : target.getEquipment().getArmorContents()) {
-            if (ItemUtils.isArmor(itemStack)) {
+            if (itemStack != null && ItemUtils.isArmor(itemStack)) {
                 return true;
             }
         }