
Command
/tellraw
Sends a message written as a text component to players, with full control over color, style, and click and hover actions.
| /tellraw <targets> <message> |
| Argument | Kind of value | What to type |
|---|---|---|
| <targets> | Target selector | The players who receive the message. Any number of players, given as a selector or a player name. One or more players. |
| <message> | Text component | The text component to send: a quoted string, a component in braces such as {text:"Hi",color:"green"}, or a list of components in square brackets. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Server operators, players in a singleplayer or LAN world with cheats enabled, the server console, command blocks and functions. |
| Result | The players receive the message as a system message. The command prints nothing to the sender. Returns the number of players the message was sent to. |
| Text component form | In 26.3 the message is written in the same notation as other command data: {text:"Hello",color:"gold"}. Keys do not need quotes. A plain quoted string such as "Hello" is also a valid message, and a list in square brackets joins several parts into one message. |
| Style keys | color, bold, italic, underlined, strikethrough, obfuscated, font, shadow_color, insertion, click_event and hover_event. |
| Click actions | click_event takes an action: open_url (with url), run_command (with command), suggest_command (with command), change_page (with page), copy_to_clipboard (with value), show_dialog (with dialog) or custom (with id). |
| Hover text | hover_event with action show_text and a value shows text when the pointer is over the message. |
| Resolved per player | Parts such as selector are filled in separately for each player who receives the message. |
| Players only | The targets must be players. An invalid message fails before anything is sent. |
/tellraw @a "Hello everyone"Sends the plain text Hello everyone to all players.
/tellraw @a {text:"Server restarting soon",color:"red",bold:true}Sends a bold red warning to all players.
/tellraw @p [{text:"Welcome, "},{selector:"@p",color:"aqua"},{text:"!"}]Greets the nearest player, showing their name in aqua.
/tellraw @a {text:"Click to open the menu",underlined:true,click_event:{action:"run_command",command:"/trigger menu"}}Sends underlined text that runs /trigger menu for the player who clicks it.
/tellraw @s {text:"Hover over me",color:"yellow",hover_event:{action:"show_text",value:"Secret text"}}Sends you yellow text that shows Secret text when you hover over it.
/tellraw @a {text:"Copy the seed",click_event:{action:"copy_to_clipboard",value:"12345"}}Sends text that copies 12345 to the clipboard when clicked.



