mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-25 12:06:09 +01:00
Fixes players being able to throw items if right-clicking blocks.
This commit is contained in:
parent
afba9cdbcd
commit
dbe566315d
@ -251,7 +251,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) {
|
||||
@ -267,9 +267,11 @@ public class PlayerListener extends ModifyworldListener {
|
||||
event.getPlayer().updateInventory();
|
||||
}
|
||||
}
|
||||
if (action == Action.RIGHT_CLICK_AIR) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (action != Action.LEFT_CLICK_BLOCK && action != Action.RIGHT_CLICK_BLOCK && action != Action.PHYSICAL) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user