minecraft.wiki-mirror/wiki_backup/Commands_tell.txt
2024-12-19 15:45:47 -05:00

80 lines
2.5 KiB
Text

{{Infobox command
| name = msg
| alias =
* {{cmd|tell|link=none}}
* {{cmd|w|link=none}}
| oplevel = 0
}}
{{distinguish|Commands/tellraw|Commands/say}}Sends a private message to one or more players.
==Syntax==
*'''Java Edition'''
: {{cmd|link=none|msg <targets> <message>}}
*'''Bedrock Edition'''
: {{cmd|link=none|msg <target: target> <message: message>}}
==Arguments==
{{argument|targets|entity|target: target|CommandSelector<Player>}}
: Specifies the player(s) to send the message to.
: {{arg desc|je=entity|amount=multiple|type=players|be=player}}
{{argument|message|message|message: message|CommandMessage}}
: Specifies the message to tell.
: {{arg desc|je=message|be=CommandMessage}}
==Result==
{{Result table}}
{{Result table|The command is incomplete, or any argument is not specified correctly.|unparseable|unparseable}}
{{Result table|<code>player: target</code> is a target selector that is not of [[Target_selectors#Player_type_and_single_type|player type]].|N/A|fail}}
{{Result table|<code><targets></code> or <code>player: target</code> fails to resolve to one or more online players.|fail}}
{{Result table|succeed}}
{{Result table}}
== Output ==
{{Output table}}
{{Output table|edition=je|On fail|0|0|0}}
{{Output table|On success|1|1|the number of targeted players}}
{{Output table|edition=be|On fail|0}}
{{Output table|On success|the number of targeted players}}
{{Output table}}
==Examples==
* To privately tell Steve to start the game: {{cmd|link=none|tell Steve Start the game!}}
* To say "Hi" to all online players: {{cmd|link=none|msg @a Hi}}
* To whisper to Makena instructions to trap Zuri: {{cmd|link=none|w Makena Trap Zuri now!}}
== History ==
{{HistoryTable
|{{HistoryLine|java alpha}}
|{{HistoryLine||v1.0.16_02|Added {{cmd|msg|link=none}}, {{cmd|tell|link=none}}, and {{cmd|w|link=none}}.}}
|{{HistoryLine|java}}
|{{HistoryLine||1.16.2|dev=Pre-release 2|This commmand now displays the message to the sender even if {{cmd|gamerule sendCommandFeedback}} is disabled.<ref>{{bug|MC-134084|resolution=Fixed}}</ref>}}
|{{HistoryLine|pocket alpha}}
|{{HistoryLine||v0.16.0|dev=build 1|Added {{cmd|msg|link=none}}, {{cmd|tell|link=none}}, and {{cmd|w|link=none}}.}}
}}
== See also ==
* <code>/[[Commands/tellraw|tellraw]]</code> — send a JSON message to players.
== References ==
<references/>
== Navigation ==
{{Navbox commands}}
[[de:Befehl/msg]]
[[es:Comandos/msg]]
[[ja:コマンド/msg]]
[[nl:Opdrachten/msg]]
[[pt:Comandos/msg]]
[[ru:Команды консоли/tell]]
[[zh:命令/msg]]