ItemConsumable is the base class for items that are consumed, such as food and drinks. It has no effect of its own: using the item runs the PrePlayerConsumeItem and PlayerConsumeItem hooks, where plugins and schemas apply the effect, and the item is then removed. A derived item only has to set its appearance; use_text renames the use option of its menu.

Summary

Methods

Called on the server by the 'PlayerUseItem' hook when a player uses the item.

Methods

Called on the server by the 'PlayerUseItem' hook when a player uses the item. Runs the 'PlayerConsumeItem' hook unless 'PrePlayerConsumeItem' returns false. Returns nothing, so the item is always removed afterward.

Parameters

  • actor Player

Defined in