mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 09:06:46 +01:00
Fixing more NPEs with custom blocks.
This commit is contained in:
parent
b9f2aa5eff
commit
cd5df82d72
@ -219,7 +219,7 @@ public class Mining {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (ModChecks.isCustomMiningBlock(block)) {
|
if (ModChecks.isCustomMiningBlock(block) && ModChecks.getCustomBlock(block) != null) {
|
||||||
CustomBlock customBlock = ModChecks.getCustomBlock(block);
|
CustomBlock customBlock = ModChecks.getCustomBlock(block);
|
||||||
int minimumDropAmount = customBlock.getMinimumDropAmount();
|
int minimumDropAmount = customBlock.getMinimumDropAmount();
|
||||||
int maximumDropAmount = customBlock.getMaximumDropAmount();
|
int maximumDropAmount = customBlock.getMaximumDropAmount();
|
||||||
@ -365,7 +365,7 @@ public class Mining {
|
|||||||
int durabilityLoss = Config.getInstance().getAbilityToolDamage();
|
int durabilityLoss = Config.getInstance().getAbilityToolDamage();
|
||||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||||
|
|
||||||
if (ModChecks.isCustomMiningBlock(block)) {
|
if (ModChecks.isCustomMiningBlock(block) && ModChecks.getCustomBlock(block) != null) {
|
||||||
if (ModChecks.getCustomBlock(block).getTier() < tier) {
|
if (ModChecks.getCustomBlock(block).getTier() < tier) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user