diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index ca15c9f42..c0f37ed0a 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -528,6 +528,10 @@ public class PlayerListener implements Listener { switch (event.getAction()) { case RIGHT_CLICK_BLOCK: + if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isSneaking()) { + return false; + } + Block block = event.getClickedBlock(); BlockState blockState = block.getState(); @@ -569,7 +573,10 @@ public class PlayerListener implements Listener { break; case RIGHT_CLICK_AIR: - + if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isSneaking()) { + return false; + } + /* ACTIVATION CHECKS */ if (Config.getInstance().getAbilitiesEnabled()) { mcMMOPlayer.processAbilityActivation(SkillType.AXES);