Skip to main content
Triggered when a new inventory is created. Register with registerHook using the event name onInventoryCreated.

Payload

This hook is notification-only and cannot cancel inventory creation. Useful for adding starter items, pre-populating inventories with random loot, or logging inventory creation. Use exports to add items to the inventory within the callback.
Available filters: inventoryTypeFilter (filter by inventory type: player, stash, trunk, dumpster, etc.), inventoryFilter (filter by specific inventory ID patterns).

Examples

An existing hook for this is already provided in the _hooks folder of jaksam_inventory.
See Hooks overview for the registerHook API, available filters, and return-value behavior.