Fix NullPointerException

This commit is contained in:
Brady
2018-12-15 12:27:19 -06:00
parent 764e8d7daa
commit 9703de86d3

View File

@@ -55,7 +55,8 @@ public final class BlockBreakHelper implements Helper {
} }
public void stopBreakingBlock() { public void stopBreakingBlock() {
if (playerContext.playerController() != null) { // The player controller will never be null, but the player can be
if (playerContext.player() != null) {
playerContext.playerController().resetBlockRemoving(); playerContext.playerController().resetBlockRemoving();
} }
lastBlock = null; lastBlock = null;