From 6c6ab4c96e5a9bc28fc846fd46ffeb8106e20f4e Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 22 Feb 2013 14:50:41 -0500 Subject: [PATCH] We only need the block in here. --- .../java/com/gmail/nossr50/listeners/PlayerListener.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index ec26f221f..96a8d95cc 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -326,17 +326,12 @@ public class PlayerListener implements Listener { return; } - Block block = event.getClickedBlock(); - BlockState blockState = null; - - if (block != null) { - blockState = block.getState(); - } - ItemStack heldItem = player.getItemInHand(); switch (event.getAction()) { case RIGHT_CLICK_BLOCK: + Block block = event.getClickedBlock(); + BlockState blockState = block.getState(); /* ACTIVATION & ITEM CHECKS */ if (BlockChecks.canActivateAbilities(blockState)) {