Denizen Script Events


Events are a way to listen to things that happened on your server and respond to them through a script. These usually pair with 'world' script containers.
Learn about how events work in The Beginner's Guide.


Showing 1 out of 399 events...
Nameplayer inventory slot changes
Event Lines player inventory slot changes
Triggerswhen the item in a slot of a player's inventory changes.
Note that this fires for every item in the player's inventory when they join.
Generated Examplesafter player inventory slot changes:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesfrom:<item> to only process the event if the previous item in the slot matches the specified item.
to:<item> to only process the event if the new item in the slot matches the specified item.
slot:<slot> to only process the event if a specific slot was clicked. For slot input options, see Language:Slot Inputs.
Contexts<context.new_item> returns an ItemTag of the new item in the slot.
<context.old_item> returns an ItemTag of the previous item in the slot.
<context.slot> returns an ElementTag(Number) of the slot that was changed.
<context.raw_slot> returns an ElementTag(Number) of the raw number of the slot that was changed.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerInventorySlotChangeScriptEvent.java#L16