A chat line, heard by everyone on the channel. Part of the IRC schema reference.
{
"type": "chat",
"message": "hello from FriendNet"
}| Field | Type | Constraints |
|---|---|---|
type | "chat" | Discriminator |
message | Chat component | The line itself — see below |
There is no sender field: the speaker is always the authenticated account behind the POST, and receivers read it from the meta event's uuid that precedes every delivered frame. To address one player instead of the channel, send a message.
The client ingest path drops an identical message from the same player sent less than 2 seconds apart. Authoritative publishes bypass that check entirely — a peer vouches for its own users, duplicates included.
Chat components
message is a full Minecraft text component (spec), which takes one of three forms:
- A plain string — shorthand for
{ "text": "..." }. If you're bridging a plain-text IRC network, this is all you need. - An array of components — the first element is the parent, the rest render as its
extra. - A component object — a content type plus optional formatting and interactivity.
Content types
| Content | Required fields | Renders as |
|---|---|---|
| text | text | The literal string |
| translatable | translate, optional fallback, with | A translation key resolved client-side |
| score | score: { name, objective } | A scoreboard value |
| selector | selector, optional separator | Resolved entity names |
| keybind | keybind | The player's bound key |
| nbt | nbt, optional source, interpret, separator, block/entity/storage | NBT lookups |
| object | sprite (atlas) or player | Inline sprite or player head |
The type field on component objects is optional — content is inferred from which fields are present.
Formatting and interactivity
Any component object may additionally carry:
| Field | Type |
|---|---|
color | Named color (red, gold, …) or #rrggbb |
font | string |
bold, italic, underlined, strikethrough, obfuscated | boolean |
shadow_color | ARGB int or [r, g, b, a] floats |
insertion | string (shift-click inserts into chat) |
click_event | open_url, run_command, suggest_command, change_page, copy_to_clipboard, show_dialog, custom, … |
hover_event | show_text, show_item, show_entity |
extra | Array of child components |
{
"type": "chat",
"message": [
{
"text": "[FriendNet] ",
"color": "gold",
"bold": true
},
{
"text": "hello over the bridge",
"color": "white"
}
]
}