---
title: Container Set Slot
description: "Play 0x14, server → client."
---

`play` · `0x14` · **clientbound** (server → client)

Sets a single slot in the window `windowId` to `item`. Window -1 sets the cursor item; window -2 sets a player inventory slot without a window. The server sends it whenever one slot changes. The client updates that slot and uses `stateId` to detect stale updates.

Sent by the server, read by the client. Listen for it with `client.on("ContainerSetSlot", (data) => …)` on the receiving side.

## Fields

| Field | Type | Notes |
|---|---|---|
| `windowId` | ContainerID |  |
| `stateId` | VarInt |  |
| `slot` | Short |  |
| `item` | [Slot](/docs/items) | also `slotData` |

## Send it

```ts
await client.sendPacket("ContainerSetSlot", {
  windowId: /* ContainerID */,
  stateId: /* VarInt */,
  slot: /* Short */,
  item: /* Slot */,
});
```

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: [`src/Core/Versions/776/Packets/play/clientbound/ContainerSetSlot.ts`](https://github.com/GDLev/mc-protocol/blob/master/src/Core/Versions/776/Packets/play/clientbound/ContainerSetSlot.ts)
