Set Score
Play 0x6E, server → client.
play · 0x6E · clientbound (server → client)
Sets a score holder’s value for an objective. itemName is the holder, scoreName the objective; optional display name and number format override the objective defaults. The client updates its scoreboard display.
Sent by the server, read by the client. Listen for it with client.on("SetScore", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
itemName |
String | |
scoreName |
String | |
value |
VarInt | also payload |
display_name |
Optional | |
number_format |
Optional | |
styling |
Struct |
Send it
await client.sendPacket("SetScore", {
itemName: /* String */,
scoreName: /* String */,
value: /* VarInt */,
display_name: /* Optional */,
number_format: /* Optional */,
styling: /* Struct */,
});
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/SetScore.ts