TextHints
The common fields of a text component, for suggestions; any other field works too.
Properties
Section titled “Properties”
optionalbold?:boolean
Bold text.
click_event?
Section titled “click_event?”
optionalclick_event?:NbtCompound
What happens on click, e.g. {action: "run_command", command: "/say hi"}.
color?
Section titled “color?”
optionalcolor?:ChatColor|`#${string}`
A named color (gold) or #RRGGBB.
extra?
Section titled “extra?”
optionalextra?:TextComponent[]
More components appended after this one, inheriting its style.
optionalfont?:string
A font id, e.g. minecraft:alt.
hover_event?
Section titled “hover_event?”
optionalhover_event?:NbtCompound
What shows on hover, e.g. {action: "show_text", value: "hi"}.
insertion?
Section titled “insertion?”
optionalinsertion?:string
Text put into the chat box when shift-clicked.
italic?
Section titled “italic?”
optionalitalic?:boolean
Italic text.
keybind?
Section titled “keybind?”
optionalkeybind?:string
Shows the key bound to a control, e.g. key.jump.
optionalnbt?:string
An NBT path; shows the value it points to (with block, entity or storage).
obfuscated?
Section titled “obfuscated?”
optionalobfuscated?:boolean
Randomly changing characters.
score?
Section titled “score?”
optionalscore?:object
Shows a score: holder name (a selector or name) in objective.
name:
string
objective
Section titled “objective”objective:
string
selector?
Section titled “selector?”
optionalselector?:string
Shows the names of the entities a selector finds.
strikethrough?
Section titled “strikethrough?”
optionalstrikethrough?:boolean
Struck-through text.
optionaltext?:string
Plain text.
translate?
Section titled “translate?”
optionaltranslate?:string
A translation key, shown in the player’s language.
underlined?
Section titled “underlined?”
optionalunderlined?:boolean
Underlined text.
optionalwith?:TextComponent[]
Values for the %s placeholders of translate.