mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
support for ML 1.2
This commit is contained in:
parent
492e406f2d
commit
adaafe72b6
@ -81,11 +81,7 @@ public class ItemUse implements Listener {
|
||||
}
|
||||
|
||||
if (useItem instanceof Consumable) {
|
||||
|
||||
// Since the interact event is cancelled, no skills is cast by MythicLib. They must be force-cast
|
||||
event.setUseItemInHand(Event.Result.DENY);
|
||||
useItem.getPlayerData().getMMOPlayerData().triggerSkills(player.isSneaking() ? TriggerType.SHIFT_RIGHT_CLICK : TriggerType.RIGHT_CLICK, null);
|
||||
|
||||
Consumable.ConsumableConsumeResult result = ((Consumable) useItem).useOnPlayer(event.getHand());
|
||||
if (result == Consumable.ConsumableConsumeResult.CANCEL)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user