Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/tellraw

Command

/tellraw

Sends a message written as a text component to players, with full control over color, style, and click and hover actions.

Syntax

/tellraw <targets> <message>

Arguments

ArgumentKind of valueWhat to type
<targets>Target selectorThe players who receive the message. Any number of players, given as a selector or a player name. One or more players.
<message>Text componentThe 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.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inServer operators, players in a singleplayer or LAN world with cheats enabled, the server console, command blocks and functions.
ResultThe 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 formIn 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 keyscolor, bold, italic, underlined, strikethrough, obfuscated, font, shadow_color, insertion, click_event and hover_event.
Click actionsclick_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 texthover_event with action show_text and a value shows text when the pointer is over the message.
Resolved per playerParts such as selector are filled in separately for each player who receives the message.
Players onlyThe targets must be players. An invalid message fails before anything is sent.

Examples

/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.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)