diff --git a/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java b/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java index 1943adb12..3fb509270 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java @@ -101,7 +101,15 @@ public class AxesManager extends SkillManager { Material armorType = armor.getType(); double durabilityModifier = 1 / (armor.getEnchantmentLevel(Enchantment.DURABILITY) + 1); // Modifier to simulate the durability enchantment behavior double modifiedDurabilityDamage = durabilityDamage * durabilityModifier; - short maxDurability = (short) Math.max(armorType.getMaxDurability(), mcMMO.getRepairableManager().getRepairable(armorType).getMaximumDurability()); + short maxDurability; + + try { + maxDurability = mcMMO.getRepairableManager().getRepairable(armorType).getMaximumDurability(); + } + catch (NullPointerException e) { + maxDurability = armorType.getMaxDurability(); + } + double maxDurabilityDamage = maxDurability * Axes.impactMaxDurabilityModifier; armor.setDurability((short) (Math.min(modifiedDurabilityDamage, maxDurabilityDamage) + armor.getDurability()));