mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-02-12 13:01:26 +01:00
!Cancel use event when item unsuable
This commit is contained in:
parent
7f827f35b4
commit
69a8df439b
@ -69,8 +69,13 @@ public class ItemUse implements Listener {
|
||||
if (useItem instanceof Consumable && ((Consumable) useItem).hasVanillaEating())
|
||||
return;
|
||||
|
||||
if (!useItem.canBeUsed())
|
||||
/*
|
||||
* (BUG FIX) cancel the event to prevent things like shield blocking
|
||||
*/
|
||||
if (!useItem.canBeUsed()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// commands & consummables
|
||||
if (event.getAction().name().contains("RIGHT_CLICK")) {
|
||||
|
Loading…
Reference in New Issue
Block a user