| Name | player inventory slot changes |
| Event Lines | player inventory slot changes |
| Triggers | when 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 Examples | after player inventory slot changes: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | from:<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 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 Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerInventorySlotChangeScriptEvent.java#L16 |