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

Game Rule Values

Play 0x27, server → client.

play · 0x27 · clientbound (server → client)

Sends the current value of one or more game rules that the client needs to know about. The server sends it after login and whenever a relevant rule changes. The client stores the values for rules that affect client behavior.

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

Fields

Field Type Notes
rules Array

Send it

await client.sendPacket("GameRuleValues", {
  rules: /* Array */,
});

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

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

Was this page helpful?