From 9703de86d31cdda7a9ef2de083426ab3205798dd Mon Sep 17 00:00:00 2001 From: Brady Date: Sat, 15 Dec 2018 12:27:19 -0600 Subject: [PATCH] Fix NullPointerException --- src/main/java/baritone/utils/BlockBreakHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/utils/BlockBreakHelper.java b/src/main/java/baritone/utils/BlockBreakHelper.java index d4d03f67..9f5b970d 100644 --- a/src/main/java/baritone/utils/BlockBreakHelper.java +++ b/src/main/java/baritone/utils/BlockBreakHelper.java @@ -55,7 +55,8 @@ public final class BlockBreakHelper implements Helper { } 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(); } lastBlock = null;