forceHeldSlot

abstract fun forceHeldSlot(player: Player, slot: Int)

Forces the player's held item slot to the specified index via a packet.

Parameters

player

The target player.

slot

The hotbar slot index (0–8) to force.