Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Container Close (serverbound)

Play 0x13, client → server.

play · 0x13 · serverbound (client → server)

Sent when the player closes a container window. windowId is the container id, or 0 for the player inventory. The server drops the container and returns any cursor item; it is also sent in reply to a clientbound ContainerClose.

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

Fields

Field Type Notes
windowId ContainerID

Send it

await client.sendPacket("ContainerClose", {
  windowId: /* ContainerID */,
});

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

Source: src/Core/Versions/776/Packets/play/serverbound/ContainerClose.ts

Was this page helpful?