Skip to content

TextHints

The common fields of a text component, for suggestions; any other field works too.

optional bold?: boolean

Bold text.


optional click_event?: NbtCompound

What happens on click, e.g. {action: "run_command", command: "/say hi"}.


optional color?: ChatColor | `#${string}`

A named color (gold) or #RRGGBB.


optional extra?: TextComponent[]

More components appended after this one, inheriting its style.


optional font?: string

A font id, e.g. minecraft:alt.


optional hover_event?: NbtCompound

What shows on hover, e.g. {action: "show_text", value: "hi"}.


optional insertion?: string

Text put into the chat box when shift-clicked.


optional italic?: boolean

Italic text.


optional keybind?: string

Shows the key bound to a control, e.g. key.jump.


optional nbt?: string

An NBT path; shows the value it points to (with block, entity or storage).


optional obfuscated?: boolean

Randomly changing characters.


optional score?: object

Shows a score: holder name (a selector or name) in objective.

name: string

objective: string


optional selector?: string

Shows the names of the entities a selector finds.


optional strikethrough?: boolean

Struck-through text.


optional text?: string

Plain text.


optional translate?: string

A translation key, shown in the player’s language.


optional underlined?: boolean

Underlined text.


optional with?: TextComponent[]

Values for the %s placeholders of translate.