From cd5df82d72bc417abfc8be765b77ee05ba403f39 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Fri, 28 Dec 2012 20:47:39 -0800 Subject: [PATCH] Fixing more NPEs with custom blocks. --- src/main/java/com/gmail/nossr50/skills/gathering/Mining.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Mining.java b/src/main/java/com/gmail/nossr50/skills/gathering/Mining.java index db51cfd9b..0f37a542f 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Mining.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Mining.java @@ -219,7 +219,7 @@ public class Mining { break; default: - if (ModChecks.isCustomMiningBlock(block)) { + if (ModChecks.isCustomMiningBlock(block) && ModChecks.getCustomBlock(block) != null) { CustomBlock customBlock = ModChecks.getCustomBlock(block); int minimumDropAmount = customBlock.getMinimumDropAmount(); int maximumDropAmount = customBlock.getMaximumDropAmount(); @@ -365,7 +365,7 @@ public class Mining { int durabilityLoss = Config.getInstance().getAbilityToolDamage(); FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player); - if (ModChecks.isCustomMiningBlock(block)) { + if (ModChecks.isCustomMiningBlock(block) && ModChecks.getCustomBlock(block) != null) { if (ModChecks.getCustomBlock(block).getTier() < tier) { return; }