Custom Payload (clientbound)
Play 0x18, server → client.
play · 0x18 · clientbound (server → client)
Sends a plugin message on the named channel with raw data. Vanilla uses it for channels such as minecraft:brand, and mods and servers use it for custom communication. The client ignores channels it does not recognize.
Sent by the server, read by the client. Listen for it with client.on("CustomPayload", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
channel |
String | |
data |
Byte[] |
Send it
await client.sendPacket("CustomPayload", {
channel: /* String */,
data: /* Byte[] */,
});
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/CustomPayload.ts