/msg

Jump to navigation Jump to search
Not to be confused with Commands/tellraw or Commands/say.
/msg
Aliases
  • /tell
  • /w
Permission level
required

0

Restrictions

None

Sends a private message to one or more players.

Syntax[edit | edit source]

  • Java Edition
/msg <targets> <message>
  • Bedrock Edition
/msg <target: target> <message: message>

Arguments[edit | edit source]

JE<targets>: entity
BE: target: target: CommandSelector<Player>

Specifies the player(s) to send the message to.
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. In Bedrock Edition, the target selector should be of player type.

JE<message>: message
BE: message: message: CommandMessage

Specifies the message to tell.
It is a greedy phrase string argument (taking the rest of the command as the string argument). Can include spaces as well as target selectors. The game replaces entity selectors in the message with the list of selected entities' names, which is formatted as "name1 and name2" for two entities, or "name1, name2, ... and namen" for n entities. In Bedrock Edition, @<player name> can be used to mention a player; @here can be used to mention all players.

Result[edit | edit source]

CommandTriggerJava EditionBedrock Edition
AnyThe command is incomplete, or any argument is not specified correctly. Unparseable Unparseable
player: target is a target selector that is not of player type. N/A Failed
<targets> or player: target fails to resolve to one or more online players. Failed
OtherwiseSuccessful

Output[edit | edit source]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
AnyJava EditionOn fail000
On success11the number of targeted players
Bedrock EditionOn fail0N/AN/A
On successthe number of targeted playersN/AN/A

Examples[edit | edit source]

  • To privately tell Steve to start the game: /tell Steve Start the game!
  • To say "Hi" to all online players: /msg @a Hi
  • To whisper to Makena instructions to trap Zuri: /w Makena Trap Zuri now!

History[edit | edit source]

[hide]Java Edition Alpha
v1.0.16_02Added /msg, /tell, and /w.
[hide]Java Edition
1.16.2Pre-release 2This command now displays the message to the sender even if /gamerule sendCommandFeedback is disabled.[1]
[hide]Pocket Edition Alpha
v0.16.0build 1Added /msg, /tell, and /w.

See also[edit | edit source]

  • /tellraw — send a JSON message to players.

References[edit | edit source]

  1. MC-134084 — resolved as "Fixed".

Navigation[edit | edit source]