From 95dd7f58415322724d44479c67e20df33030dc5f Mon Sep 17 00:00:00 2001 From: Psithief Date: Fri, 27 Jul 2012 08:56:52 +0800 Subject: [PATCH] Fixed throw check on non-air blocks. --- .../ru/tehkode/modifyworld/handlers/PlayerListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/tehkode/modifyworld/handlers/PlayerListener.java b/src/main/java/ru/tehkode/modifyworld/handlers/PlayerListener.java index 50ccd65..d998418 100644 --- a/src/main/java/ru/tehkode/modifyworld/handlers/PlayerListener.java +++ b/src/main/java/ru/tehkode/modifyworld/handlers/PlayerListener.java @@ -181,7 +181,7 @@ public class PlayerListener extends ModifyworldListener { Player player = event.getPlayer(); - if (action == Action.RIGHT_CLICK_AIR) { //RIGHT_CLICK_AIR is cancelled by default. + if (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK) { //RIGHT_CLICK_AIR is cancelled by default. switch (player.getItemInHand().getType()) { case POTION: //Only check splash potions. if ((player.getItemInHand().getDurability() & 0x4000) != 0x4000) { @@ -197,7 +197,9 @@ public class PlayerListener extends ModifyworldListener { event.getPlayer().updateInventory(); } } - return; + if (action == Action.RIGHT_CLICK_AIR) { + return; + } } }