Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/tellraw: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 1: Line 1:
{{MC/Distinguish|Commands/msg|Commands/say}}
{{distinguish|Commands/msg|Commands/say}}
{{about|the command that sends JSON messages|the command to whisper|Commands/tell}}
{{about|the command that sends JSON messages|the command to whisper|Commands/tell}}
{{Infobox command
{{Infobox command
Line 8: Line 8:
}}
}}


Sends a JSON message to players.
Sends a [[Minecraft:Text|JSON message]] to players.


==Syntax==
==Syntax==
Line 20: Line 20:
==Arguments==
==Arguments==


{{MC/Argument|targets|entity|target: target|CommandSelector<Player>}}
{{argument|targets|entity|target: target|CommandSelector<Player>}}
: Specifies the player(s) to send the message to.
: Specifies the player(s) to send the message to.
: {{MC/Arg desc|je=entity|amount=multiple|type=players|be=player}}
: {{arg desc|je=entity|amount=multiple|type=players|be=player}}


{{MC/Argument|message|component|raw json message: json|Json::Value}}
{{argument|message|component|raw json message: json|Json::Value}}
: Specifies the message to send.
: Specifies the message to send.
: {{MC/Arg desc|je=component|be=Json::Value}}
: {{arg desc|je=component|be=Json::Value}}


==Result==
==Result==
Line 32: Line 32:
{{Result table}}
{{Result table}}
{{Result table|The command is incomplete, or any argument is not specified correctly.|unparseable|unparseable}}
{{Result table|The command is incomplete, or any argument is not specified correctly.|unparseable|unparseable}}
{{Result table|<code>raw json message: json</code> is not a raw JSON text.|N/A|fail}}
{{Result table|<code>raw json message: json</code> is not a [[Minecraft:raw JSON text]].|N/A|fail}}
{{Result table|<code>player: target</code> is a target selector that is not in [[Minecraft:Target selectors#Player type and single type|player type]].}}
{{Result table|<code>player: target</code> is a target selector that is not in [[Minecraft:Target selectors#Player type and single type|player type]].}}
{{Result table|<code><targets></code> or <code>player: target</code> fails to resolve to one or more online players.|fail}}
{{Result table|<code><targets></code> or <code>player: target</code> fails to resolve to one or more online players.|fail}}
Line 40: Line 40:
== Output ==
== Output ==


{{MC/Output table}}
{{Output table}}
{{MC/Output table|edition=je|On fail|0|0|0}}
{{Output table|edition=je|On fail|0|0|0}}
{{MC/Output table|On success|1|1|the number of targeted players}}
{{Output table|On success|1|1|the number of targeted players}}
{{MC/Output table|edition=be|On fail|0}}
{{Output table|edition=be|On fail|0}}
{{MC/Output table|On success|1}}
{{Output table|On success|1}}
{{MC/Output table}}
{{Output table}}


== Examples ==
== Examples ==
{{MC/More images|section=true}}
{{More images|section=true}}
{| class="wikitable"
{| class="wikitable"
!
!
Line 78: Line 78:
|<code>/tellraw @a {"rawtext":[{"text":"§4Y0U G3T B4CK H3R3 N0W"}]}</code>
|<code>/tellraw @a {"rawtext":[{"text":"§4Y0U G3T B4CK H3R3 N0W"}]}</code>
|[[File:Y0U G3T B4CK H3R3 N0W.png|alt=Y0U G3T B4CK H3R3 N0W (Dark red)|frameless]]
|[[File:Y0U G3T B4CK H3R3 N0W.png|alt=Y0U G3T B4CK H3R3 N0W (Dark red)|frameless]]
|-
|To send the message "Read the fine print." in italics in chat:
|<code>/tellraw @a {text:"Read the fine print.","italic":true}</code>
|
|
|-
|-
|Use '\n' to insert a new line:
|Use '\n' to insert a new line:
Line 91: Line 96:
|
|
|-
|-
|Display a message in the [[Minecraft:Enchanting Table]]'s glyphs:
|Display a message in the [[Minecraft:Enchanting Table]]'s [[Minecraft:Standard Galactic Alphabet|glyphs]]:
|<code>/tellraw @a {text:"Hello World",font:alt}</code>
|<code>/tellraw @a {text:"Hello World",font:alt}</code>


Line 98: Line 103:
|[[File:Hello World.png|alt=⍑ᒷꖎꖎ𝙹 ∴𝙹∷ꖎ↸|frameless]]
|[[File:Hello World.png|alt=⍑ᒷꖎꖎ𝙹 ∴𝙹∷ꖎ↸|frameless]]
|-
|-
|Display a message in the [[Minecraft:illager]] runes:
|Display a message in the [[Minecraft:illager]] [[Minecraft:Dungeons:Illageralt|runes]]:
|<code>/tellraw @a {"text":"Hello World","font":"illageralt"}</code>
|<code>/tellraw @a {"text":"Hello World","font":"illageralt"}</code>


Line 112: Line 117:
|[[File:Diamond1.png|alt=Diamond|frameless]]
|[[File:Diamond1.png|alt=Diamond|frameless]]
|-
|-
|Simulate the output of {{MC/Command|say|@p loves Minecraft!}}, run through a command block:
|Simulate the output of {{command|say|@p loves Minecraft!}}, run through a [[Minecraft:command block]]:
|
|
|<code>/tellraw @a {"translate":"chat.type.announcement","with":[{"text":"@"},[{"selector":"@p"},{"text":" loves Minecraft!"}]]}</code>
|<code>/tellraw @a {"translate":"chat.type.announcement","with":[{"text":"@"},[{"selector":"@p"},{"text":" loves Minecraft!"}]]}</code>
Line 119: Line 124:


== History ==
== History ==
{{MC/For|changes to the raw JSON text used by this command|Raw JSON text format#History}}
{{for|changes to the raw JSON text used by this command|Raw JSON text format#History}}


=== ''Java Edition'' ===
=== ''Java Edition'' ===
{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.7.2|dev=13w37a|Added {{MC/Cmd|tellraw|link=none}}.}}
|{{HistoryLine||1.7.2|dev=13w37a|Added {{cmd|tellraw|link=none}}.}}
|{{MC/HistoryLine||1.21.5|dev=25w02a|Text Components are now specified with SNBT instead of JSON.}}
|{{HistoryLine||1.21.5|dev=25w02a|Text Components are now specified with SNBT instead of JSON.}}
}}
}}


=== ''Bedrock Edition'' ===
=== ''Bedrock Edition'' ===
{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|bedrock}}
|{{HistoryLine|bedrock}}
|{{HistoryLine||1.9.0|dev=beta 1.9.0.0|Added {{MC/Cmd|tellraw|link=none}}.}}
|{{HistoryLine||1.9.0|dev=beta 1.9.0.0|Added {{cmd|tellraw|link=none}}.}}
}}
}}


==See also==
==See also==
* {{MC/Cmd|say}} — send a plain text message to all players
* {{cmd|say}} — send a plain text message to all players
* {{MC/Cmd|tell}} — send a plain private text message to specific players
* {{cmd|tell}} — send a plain private text message to specific players


== External links ==
== External links ==
Line 143: Line 148:


== Navigation ==
== Navigation ==
{{MC/Navbox commands}}
{{Navbox commands}}


de:Befehl/tellraw
[[Minecraft:de:Befehl/tellraw]]
es:Comandos/tellraw
[[Minecraft:es:Comandos/tellraw]]
ja:コマンド/tellraw
[[Minecraft:ja:コマンド/tellraw]]
pt:Comandos/tellraw
[[Minecraft:pt:Comandos/tellraw]]
ru:Команды консоли/tellraw
[[Minecraft:ru:Команды консоли/tellraw]]
zh:命令/tellraw
[[Minecraft:zh:命令/tellraw]]

Latest revision as of 11:08, 25 May 2026

Template:Distinguish

Template:Infobox command

Sends a JSON message to players.

Syntax

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

Arguments

Template:Argument

Specifies the player(s) to send the message to.
Template:Arg desc

Template:Argument

Specifies the message to send.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

Examples

Template:More images

Minecraft:Java Edition Minecraft:Bedrock Edition Preview
To send the message "Hello" in chat: /tellraw @a "Hello" /tellraw @a {"rawtext":[{"text":"Hello"}]} Hello
To send the message "I am blue" colored blue in chat: /tellraw @a {"text":"I am blue","color":"blue"}

/tellraw @a {text:"I am blue",color:blue}

/tellraw @a {"rawtext":[{"text":"§9I am blue"}]} I am blue (In blue)
To send the message "Hover me!" in chat, which displays the text "Hi!" when hovered over: /tellraw @a {text:"Hover me!",hover_event:{action:show_text,value:"Hi!"}} Hover me! (Hovered: Hi!)
To send the message-colored dark red in chat: /tellraw @a {text:"Y0U G3T B4CK H3R3 N0W",color:dark_red}

/tellraw @a {"text":"Y0U G3T B4CK H3R3 N0W","color":"dark_red"}

/tellraw @a {"rawtext":[{"text":"§4Y0U G3T B4CK H3R3 N0W"}]} Y0U G3T B4CK H3R3 N0W (Dark red)
To send the message "Read the fine print." in italics in chat: /tellraw @a {text:"Read the fine print.","italic":true}
Use '\n' to insert a new line: /tellraw @a {text:"Text1\nText2"}

/tellraw @a {"text":"Text1\nText2"}

/tellraw @a {"rawtext":[{"text":"Text1\nText2"}]} Text1 (newline) Text2
Use '\uE100' to insert a hunger bar emoji: /tellraw @a {"rawtext":[{"text":"Text1\uE100Text2"}]}
Display a message in the Minecraft:Enchanting Table's glyphs: /tellraw @a {text:"Hello World",font:alt}

/tellraw @a {"text":"Hello World","font":"alt"}

⍑ᒷꖎꖎ𝙹 ∴𝙹∷ꖎ↸
Display a message in the Minecraft:illager runes: /tellraw @a {"text":"Hello World","font":"illageralt"}

/tellraw @a {text:"Hello World",font:illageralt}

Hello World (illager runes)
Display a translated string: /tellraw @p {"translate":"item.minecraft.diamond"}

/tellraw @p {translate:item.minecraft.diamond}

/tellraw @s {"rawtext":[{"translate":"item.diamond.name"}]} Diamond
Simulate the output of Template:Command, run through a Minecraft:command block: /tellraw @a {"translate":"chat.type.announcement","with":[{"text":"@"},[{"selector":"@p"},{"text":" loves Minecraft!"}]]}

History

Template:For

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

See also

  • Template:Cmd — send a plain text message to all players
  • Template:Cmd — send a plain private text message to specific players

External links

Navigation

Template:Navbox commands

Minecraft:de:Befehl/tellraw Minecraft:es:Comandos/tellraw Minecraft:ja:コマンド/tellraw Minecraft:pt:Comandos/tellraw Minecraft:ru:Команды консоли/tellraw Minecraft:zh:命令/tellraw