Updated:
/title basics (Java)
/title @a title {"text":"START","color":"gold","bold":true}
/title @a subtitle {"text":"You have 3 minutes","color":"yellow"}
/title @a actionbar {"text":"Time left: 60s","color":"red"}
A subtitle only shows together with a title, so send the title as well.
/tellraw basics
/tellraw @a {"text":"Press the button to start","color":"green"}
Unlike /say, tellraw supports colors and bold text and does not add a name in front.
Which one to use
- title: big moments such as start and finish
- subtitle: a short explanation below it
- actionbar: timers and status
- tellraw: instructions and logs in chat
How long a title shows
/title @a times 10 70 20
Fade in, stay and fade out, in ticks (20 = 1 second). These are the defaults. /title @a clear removes the current title and /title @a reset restores the default times.
Put a score in the text
/tellraw @a ["",{"text":"Coins: "},{"score":{"name":"@s","objective":"coins"}}]
A list in [ ] joins parts into one line. The empty first part stops later parts inheriting its style. See the scoreboard guide for creating the objective.
Clickable text (Java, by version)
| Version | Run a command on click |
|---|---|
| 1.21.5+ | /tellraw @a {"text":"[Open shop]","click_event":{"action":"run_command","command":"/trigger shop"}} |
| 1.21.4 and earlier | /tellraw @a {"text":"[Open shop]","clickEvent":{"action":"run_command","value":"/trigger shop"}} |
1.21.5 renamed clickEvent to click_event, replaced value with a field per action (command, url and so on), and renamed hoverEvent to hover_event. With the old names the text shows but clicking does nothing. Players without permission can only run commands such as /trigger this way.
Bedrock Edition
/tellraw @a {"rawtext":[{"text":"Hello World"}]}
/titleraw @a title {"rawtext":[{"text":"START"}]}
Bedrock uses rawtext, which looks like Java JSON but is not the same, so Java commands cannot be pasted as is. Color text with codes such as §6 (gold) before it. Plain /title @a title START also works.
When it does not work
- "Invalid JSON": usually a missing bracket or quote. Write
\"for a quote inside text. - No title appears: a subtitle on its own is not shown.
- Clicking does nothing: check the format for your version in the table above.
The text generator builds the JSON and checks brackets for you.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.