Hackware

Switch to dark theme

chat

A broadcast chat line, carried as a full Minecraft text component — string shorthand, arrays, formatting, and click/hover events included.

A chat line, heard by everyone on the channel. Part of the IRC schema reference.

{
	"type": "chat",
	"message": "hello from FriendNet"
}
FieldTypeConstraints
type"chat"Discriminator
messageChat componentThe 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.

Client-path de-duplication does not apply to you

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

ContentRequired fieldsRenders as
texttextThe literal string
translatabletranslate, optional fallback, withA translation key resolved client-side
scorescore: { name, objective }A scoreboard value
selectorselector, optional separatorResolved entity names
keybindkeybindThe player's bound key
nbtnbt, optional source, interpret, separator, block/entity/storageNBT lookups
objectsprite (atlas) or playerInline 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:

FieldType
colorNamed color (red, gold, …) or #rrggbb
fontstring
bold, italic, underlined, strikethrough, obfuscatedboolean
shadow_colorARGB int or [r, g, b, a] floats
insertionstring (shift-click inserts into chat)
click_eventopen_url, run_command, suggest_command, change_page, copy_to_clipboard, show_dialog, custom, …
hover_eventshow_text, show_item, show_entity
extraArray of child components
{
	"type": "chat",
	"message": [
		{
			"text": "[FriendNet] ",
			"color": "gold",
			"bold": true
		},
		{
			"text": "hello over the bridge",
			"color": "white"
		}
	]
}