On Hand Item Swap (Event) — Skript

Addon: Skript · Category: Event · Since: 2.3

Syntax

[on] swap[ping of] [(hand|held)] item[s]

Description

Called whenever a player swaps the items in their main- and offhand slots. Works also when one or both of the slots are empty. The event is called before the items are actually swapped, so when you use the player's tool or player's offtool expressions, they will return the values before the swap - this enables you to cancel the event before anything happens.

Event Values

  • event-player
  • event-world

Examples

on swap hand items:
	event-player's tool is a diamond sword
	cancel event

View source