Skip to main content
Triggered when an admin takes an item out of the admin inventory (omnipack), which creates it, or drags one into it, which destroys it. This hook can cancel the operation. Register with registerHook using the event name onOmnipackTransaction. It is the only hook that knows which admin did it, so it is the one to use to log admin item spawns.

Payload

The admin inventory does not trigger onItemTransferred, it only triggers this hook. This way the restrictions you write for your players are never applied to an admin spawning an item.
Available filters: itemNameFilter, itemTypeFilter, inventoryTypeFilter and inventoryFilter - the last two apply to inventoryId, so the omnipack itself is never what you filter on.

Examples

See Hooks overview for the registerHook API, available filters, and return-value behavior.