Deny use of held items in the lobby.
This semi-reverts part of the change in e484583b7e.
We're now specifically denying the use of items if there are any. This doesn't cancel the interact event, but just prevents stuff like potion consumption.
This commit is contained in:
@@ -1081,6 +1081,11 @@ public class ArenaListener
|
||||
Player p = event.getPlayer();
|
||||
if (!arena.inLobby(p)) return;
|
||||
|
||||
// Prevent placing blocks and using held items
|
||||
if (event.hasItem()) {
|
||||
event.setUseItemInHand(Result.DENY);
|
||||
}
|
||||
|
||||
// Bail if off-hand or if there's no block involved.
|
||||
if (event.getHand() == EquipmentSlot.OFF_HAND || !event.hasBlock())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user