mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-23 04:47:34 +01:00
Consumables can now swap places with normal items
This commit is contained in:
parent
a34ba330b0
commit
5ff232a48e
@ -270,11 +270,11 @@ public class ItemUse implements Listener {
|
||||
event.setCurrentItem(result.getResult());
|
||||
}
|
||||
|
||||
if (useItem instanceof Consumable && event.getCurrentItem() != null && event.getCurrentItem().getType() != Material.AIR) {
|
||||
event.setCancelled(true);
|
||||
if (((Consumable) useItem).useOnItem(event, MMOLib.plugin.getVersion().getWrapper().getNBTItem(event.getCurrentItem())))
|
||||
if (useItem instanceof Consumable && event.getCurrentItem() != null && event.getCurrentItem().getType() != Material.AIR)
|
||||
if (((Consumable) useItem).useOnItem(event, MMOLib.plugin.getVersion().getWrapper().getNBTItem(event.getCurrentItem()))) {
|
||||
event.setCancelled(true);
|
||||
event.getCursor().setAmount(event.getCursor().getAmount() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user