ChangingItem
Gets called when the player is changing their held item.
Start a script section
!-- OnEvent ChangingItem
-- require @evPlayer *evOldItem *evNewItem $evIsAllowed
# Add your instructions here
- Group: PlayerEvents
- Cancellable: Yes
- Event data:
PlayerChangingItemEventArgs
Injected variables
| Variable | Type | Description |
|---|---|---|
@evPlayer | player value | Gets the player who is changing item. |
*evOldItem | reference to Item object | Gets the old item. |
*evNewItem | reference to Item object | Gets the new item that is being equipped. Item is null if player is equipping nothing. |
$evIsAllowed | bool value | Whether the event is allowed to run. |