Using the command
Paste the command into the server console, a command block or chat if you're an operator. From the console, leave off the leading slash.
| Target | Who sees it |
|---|---|
| @a | Everyone online |
| @p | The nearest player (from a command block) |
| @s | Whoever runs the command |
| Steve | One player by name |
How the JSON is put together
The message is a list. The first item is an empty string, so styles from one piece don't leak into the next. Every piece after that is an object with a text and its styles.
/tellraw @a ["",{"text":"Welcome ","color":"gold"},{"text":"back!","bold":true}]Since 1.21.5, commands read text as SNBT instead of strict JSON. Plain JSON like the above is still valid SNBT, so the same command works on old and new versions.
Common mistakes
- Smart quotes. Copying from a word processor turns
"into curly quotes and the command fails. Copy from here instead. - Missing the empty first item, which makes the first piece's colour apply to everything.
- Running it without permission. /tellraw needs operator level 2.