Boss Event
Play 0x09, server → client.
play · 0x09 · clientbound (server → client)
Creates, updates, or removes a boss bar identified by entityUUID. The action selects add, remove, update health, update title, update style (color and dividers), or update flags (darken sky, play boss music, create fog). The client shows or updates the bar at the top of the screen.
Sent by the server, read by the client. Listen for it with client.on("BossEvent", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
entityUUID |
UUID | |
action |
VarInt | |
title |
Struct | |
health |
Struct | |
color |
Struct | |
dividers |
Struct | |
flags |
Struct |
Send it
await client.sendPacket("BossEvent", {
entityUUID: /* UUID */,
action: /* VarInt */,
title: /* Struct */,
health: /* Struct */,
color: /* Struct */,
dividers: /* Struct */,
flags: /* Struct */,
});
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/BossEvent.ts