Minecraft:Commands/tellraw: Difference between revisions
More actions
Fixed Bedrock command example. |
Remove broken links to missing pages |
||
| Line 8: | Line 8: | ||
}} | }} | ||
Sends a | Sends a JSON message to players. | ||
==Syntax== | ==Syntax== | ||
| 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 | {{Result table|<code>raw json message: json</code> is not a 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 91: | Line 91: | ||
| | | | ||
|- | |- | ||
|Display a message in the [[Minecraft:Enchanting Table]]'s | |Display a message in the [[Minecraft:Enchanting Table]]'s glyphs: | ||
|<code>/tellraw @a {text:"Hello World",font:alt}</code> | |<code>/tellraw @a {text:"Hello World",font:alt}</code> | ||
| Line 98: | Line 98: | ||
|[[File:Hello World.png|alt=⍑ᒷꖎꖎ𝙹 ∴𝙹∷ꖎ↸|frameless]] | |[[File:Hello World.png|alt=⍑ᒷꖎꖎ𝙹 ∴𝙹∷ꖎ↸|frameless]] | ||
|- | |- | ||
|Display a message in the [[Minecraft:illager]] | |Display a message in the [[Minecraft:illager]] runes: | ||
|<code>/tellraw @a {"text":"Hello World","font":"illageralt"}</code> | |<code>/tellraw @a {"text":"Hello World","font":"illageralt"}</code> | ||
| Line 112: | Line 112: | ||
|[[File:Diamond1.png|alt=Diamond|frameless]] | |[[File:Diamond1.png|alt=Diamond|frameless]] | ||
|- | |- | ||
|Simulate the output of {{command|say|@p loves Minecraft!}}, run through a | |Simulate the output of {{command|say|@p loves Minecraft!}}, run through a 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 145: | Line 145: | ||
{{Navbox commands}} | {{Navbox commands}} | ||
de:Befehl/tellraw | |||
es:Comandos/tellraw | |||
ja:コマンド/tellraw | |||
pt:Comandos/tellraw | |||
ru:Команды консоли/tellraw | |||
zh:命令/tellraw | |||
Revision as of 15:45, 9 April 2026
|
For the {{{Description}}} of the same name, see [[{{{Destination}}}]]. |
Sends a JSON message to players.
Syntax
- Java Edition
tellraw <targets> <message>
- Bedrock Edition
tellraw <target: target> <raw json message: json>
Arguments
- Specifies the player(s) to send the message to.
- Template:Arg desc
- 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
| 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 {"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 {"rawtext":[{"text":"§4Y0U G3T B4CK H3R3 N0W"}]}
|
Y0U G3T B4CK H3R3 N0W (Dark red) |
| Use '\n' to insert a new line: | /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}
|
⍑ᒷꖎꖎ𝙹 ∴𝙹∷ꖎ↸ | |
| Display a message in the Minecraft:illager runes: | /tellraw @a {"text":"Hello World","font":"illageralt"}
|
Hello World (illager runes) | |
| Display a translated string: | /tellraw @p {"translate":"item.minecraft.diamond"}
|
/tellraw @s {"rawtext":[{"translate":"item.diamond.name"}]}
|
Diamond |
| Simulate the output of Template:Command, run through a command block: | /tellraw @a {"translate":"chat.type.announcement","with":[{"text":"@"},[{"selector":"@p"},{"text":" loves Minecraft!"}]]}
|
History
Java Edition
Bedrock Edition
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
de:Befehl/tellraw es:Comandos/tellraw ja:コマンド/tellraw pt:Comandos/tellraw ru:Команды консоли/tellraw zh:命令/tellraw