mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-23 04:47:34 +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) {
|
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);
|
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());
|
Consumable.ConsumableConsumeResult result = ((Consumable) useItem).useOnPlayer(event.getHand());
|
||||||
if (result == Consumable.ConsumableConsumeResult.CANCEL)
|
if (result == Consumable.ConsumableConsumeResult.CANCEL)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user