diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index e20cafb3a..ec26f221f 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -327,7 +327,12 @@ public class PlayerListener implements Listener { } Block block = event.getClickedBlock(); - BlockState blockState = block.getState(); + BlockState blockState = null; + + if (block != null) { + blockState = block.getState(); + } + ItemStack heldItem = player.getItemInHand(); switch (event.getAction()) {