Skip to Content
⚠ Under Construction
ReferenceC++ APIPlayerItemHeldEvent

endstone::PlayerItemHeldEvent

Called when a player changes their currently held item.

Bases: endstone::Cancellable< PlayerEvent >

Functions:

NameDescription
PlayerItemHeldEvent
getNewSlotGets the new held slot index.
getPreviousSlotGets the previous held slot index.

PlayerItemHeldEvent

PlayerItemHeldEvent(Player &player, const int previous, const int current)

getNewSlot

int getNewSlot() const

Gets the new held slot index.

Returns:

New slot index

getPreviousSlot

int getPreviousSlot() const

Gets the previous held slot index.

Returns:

Previous slot index

Last updated on