Code Of Conduct
Configuration 0x13, server → client.
config · 0x13 · clientbound (server → client)
Shows the server’s code of conduct text (contents) to the player during configuration. The client presents an accept/decline screen; accepting sends AcceptCodeOfConduct, declining disconnects. The server waits for the acceptance before continuing.
Sent by the server, read by the client. Listen for it with client.on("CodeOfConduct", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
contents |
String |
Send it
await client.sendPacket("CodeOfConduct", {
contents: "Be respectful. No griefing or harassment.",
});
The client shows contents in an accept-or-decline screen. Continue configuration only after receiving AcceptCodeOfConduct; a client that declines disconnects instead.
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/config/clientbound/CodeOfConduct.ts