Set Held Slot
Play 0x69, server → client.
play · 0x69 · clientbound (server → client)
Sets the selected hotbar slot. The server sends it on join and when it changes the selected slot, for example via /item or when a client-selected slot is rejected. The client switches the hotbar selection.
Sent by the server, read by the client. Listen for it with client.on("SetHeldSlot", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
slot |
VarInt |
Send it
await client.sendPacket("SetHeldSlot", { slot: 0 });
Selects the first hotbar slot on the client. To give it a filled map first, use SetPlayerInventory with createMapSlot.
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/SetHeldSlot.ts