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

Store Cookie

Play 0x78, server → client.

play · 0x78 · clientbound (server → client)

Asks the client to store a small key-value cookie (identifier and up to 5120 bytes) for the current session. The server can later request it with CookieRequest, including after a Transfer to another server.

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

Fields

Field Type Notes
key String
value Byte[] also payload

Send it

await client.sendPacket("StoreCookie", {
  key: /* String */,
  value: /* Byte[] */,
});

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

Source: src/Core/Versions/776/Packets/play/clientbound/StoreCookie.ts

Was this page helpful?