diff --git a/src/com/projectkorra/projectkorra/PKListener.java b/src/com/projectkorra/projectkorra/PKListener.java index 42f9d3de..4c28dd7e 100644 --- a/src/com/projectkorra/projectkorra/PKListener.java +++ b/src/com/projectkorra/projectkorra/PKListener.java @@ -1415,9 +1415,18 @@ public class PKListener implements Listener { } } - @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) - public void onPlayerSwing(final PlayerAnimationEvent event) { + @EventHandler(priority = EventPriority.NORMAL) + public void onPlayerSwing(final PlayerInteractEvent event) { final Player player = event.getPlayer(); + if (event.getHand() != EquipmentSlot.HAND) { + return; + } + if (event.getAction() != Action.LEFT_CLICK_BLOCK && event.getAction() != Action.LEFT_CLICK_AIR) { + return; + } + if (event.getAction() == Action.LEFT_CLICK_BLOCK && event.isCancelled()){ + return; + } final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player); if (bPlayer == null) { return;