| Name | player swaps items |
| Event Lines | player swaps items |
| Triggers | when a player swaps the items in their main and off hands. |
| Generated Examples | after player swaps items: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | main:<item> to only process the event if the item being put into the main hand matches the input item.
offhand:<item> to only process the event if the item being put into the off-hand matches the input item. |
| Contexts | <context.main> returns the ItemTag switched to the main hand.
<context.offhand> returns the ItemTag switched to the off hand.
|
| Determine | "MAIN:<ItemTag>" to set the item in the main hand.
"OFFHAND:<ItemTag>" to set the item in the off hand. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSwapsItemsScriptEvent.java#L17 |