Sends a JSON message to players.
Syntax
- Java Edition
tellraw <targets> <message>
- Bedrock Edition
tellraw <target: target> <raw json message: json>
Arguments
JE: <targets>: entity
BE: target: target: CommandSelector<Player>
- Must be a player name, a target selector or a UUID[Java Edition only]. And the target selector must[JE only]/should[BE only] be of player type.
- Specifies the player(s) to send the message to.
JE: <message>: component
BE: raw json message: json: Json::Value
- Must be a raw JSON text.
- Specifies the message to send.
Result
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| any | the arguments are not specified correctly | Unparseable | Failed |
if <targets> or player: target fails to resolve to one or more online players | Failed | ||
| Otherwise | Displays message to the targeted player(s). | ||
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | the number of targeted players | ||
| Bedrock Edition | On fail | 0 | N/A | N/A | |
| On success | 1 | N/A | N/A |
Examples
- To send the message "Hello" in chat:
/tellraw @a "Hello"
- To send the message "I am red" colored red in chat:
/tellraw @a {"text":"I am red","color":"red"}
- To send a message containing the text "Red" in red and "Blue" in blue:
/tellraw @a [{"text":"Red ","color":"red"},{"text":"Blue","color":"blue"}]
- To send the message "Hover me!" in chat, which displays the text "Hi!" when hovered over:
/tellraw @a {"text":"Hover me!","hoverEvent":{"action":"show_text","value":"Hi!"}}
- To send the magenta message "Hover me again!" in chat, which displays the red text "Red Title" when hovered over:
/tellraw @a {"text":"Hover me again!","color":"#ff00ff","hoverEvent":{"action":"show_text","value":{"text":"Red Title","color":"#ff0000"}}}
- To send the message "Diamond Axe" in chat, colored turqouise, with an unbreakable diamond axe showing when the text is hovered over:
/tellraw @a {"text":"Diamond Axe","color":"#00ff88","hoverEvent":{"action":"show_item","contents":{"id":"diamond_axe","count":3,"tag":"{Unbreakable:1}"}}}
- To send the message "Your Score is: " with the score for the object "object_name" of the player or entity who executed the command.
/tellraw @s [{"text":"Your Score Is: "},{"score":{"name":"@s","objective":"object_name"}}]
Bedrock Edition/Pocket Edition
text
- To send the message "Hello" in chat:
/tellraw @a {"rawtext":[{"text":"Hello"}]}
Visible text in chat:
- Hello
- To use "(quotation marks) in the chat (as part of the message):
Use '\' to the left of the quotes:
/tellraw @a {"rawtext":[{"text":"\"it\" will appear in quotes"}]}
Visible text in chat:
- "it" will appear in quotes
- Use '\n' to insert a new line:
/tellraw @a {"rawtext":[{"text":"Text1\nText2"}]}
Visible text in chat:
- Text1
- Text2
- Use '§' to change the text color:
/tellraw @a {"rawtext":[{"text":"§bColor text"}]}
Visible text in chat:
- Color text (blue)
translate
- To send the message "Download complete" in chat:
/tellraw @a {"rawtext":[{"translate":"accessibility.downloading.complete"}]}
Visible text in chat:
- Download complete
The text will appear translated for each person, according to the language they selected in their Minecraft settings.
It is not any message that can be placed in the 'translate'. Minecraft uses specific texts located in .lang files.
History
For changes to the raw JSON text used by this command, see Raw JSON text format § History.
| Java Edition | |||||
|---|---|---|---|---|---|
| 1.7.2 | 13w37a | Added /tellraw. | |||
| Bedrock Edition | |||||
| 1.9.0 | beta 1.9.0.0 | Added /tellraw. | |||
See also
/say— send a plain text message to all players/tell— send a plain private text message to specific players
The Tellraw That Only Works In Java
/tellraw @p {"text":"Hi","clickEvent":{"action":"run_command","value":"/tellraw @p {\"text\":\"Hi\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/tellraw @p {\\\"text\\\":\\\"Hi\\\",\\\"hoverEvent\\\":{\\\"action\\\":\\\"show_text\\\",\\\"contents\\\":[\\\"\\\",{\\\"selector\\\":\\\"@a \\\"},{\\\"text\\\":\\\"Is \\\"},{\\\"text\\\":\\\"NOT\\\",\\\"bold\\\":true,\\\"underlined\\\":true},{\\\"text\\\":\\\" Here At The Moment, Sorry! :[\\\"}]}}\"}}"}}