Commands/tellraw

From Minecraft Wiki
Jump to: navigation, search

Sends a JSON message to players.

Syntax[edit]

  • Java Edition
tellraw <targets> <message>
  • Bedrock Edition
tellraw <target: target> <raw json message: json>

Arguments[edit]

<targets> (BE: target: target)

Specifies the player(s) to send the message to. Must be a player name or target selector.
Entities other than players are not allowed.

<message> (BE: raw json message: json)

Specifies the message to send. Must be valid raw JSON text (for example, {"text":"Hello there!","bold":true}).

Result[edit]

Fails if the arguments are not specified correctly, or if <targets> fails to evaluate to one or more online players.

On success, the targeted players receive the JSON message in their chat.

Examples[edit]

  • 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"}}}[upcoming: JE 1.16]
  • To send the message "Diamond Axe" in chat, colored turqouise, with an unbreakable diamond axe showing when the text is hovered over:‌[upcoming: JE 1.16]
    • /tellraw @a {"text":"Diamond Axe","color":"#00ff88","hoverEvent":{"action":"show_item","contents":{"id":"diamond_axe","count":3,"tag":"{Unbreakable:1}"}}}

History[edit]

Java Edition
1.7.213w37aAdded /tellraw.
Bedrock Edition
1.9.0beta 1.9.0.0Added /tellraw.

See also[edit]

  • /say — send a plain text message to all players
  • /tell — send a plain private text message to specific players