@FunctionalInterface public interface ItemConsumptionHandler extends ItemHandler
ItemHandler
is triggered when the SlimefunItem
it was assigned to
has been consumed.
This ItemHandler
only works for food or potions.ItemHandler
,
SimpleSlimefunItem
Modifier and Type | Method and Description |
---|---|
default java.lang.Class<? extends ItemHandler> |
getIdentifier()
This method returns the identifier for this
ItemHandler . |
void |
onConsume(PlayerItemConsumeEvent e,
Player p,
ItemStack item) |
isPrivate
void onConsume(PlayerItemConsumeEvent e, Player p, ItemStack item)
default java.lang.Class<? extends ItemHandler> getIdentifier()
ItemHandler
ItemHandler
.
We use a Class
identifier to group Item Handlers together.getIdentifier
in interface ItemHandler
Class
identifier for this ItemHandler