How to send message to the player ?
The all commands to send messages:
/me <string: message>
Displays a message about yourself./say <string: message>
Sends a message in the chat./tm <string: message
Sends message to all players in the team of the current entity./w <target> <string: message>
Send a private message./title <target> <json:message>
Send messages to the screen./tellraw <target> <json:title>
Send Json message to player.s.
Target selector: @p | @r | @a | @e | @s | playerName
Raw code
/say Hello world !
/tellraw @p {"text":"Hello world !"}
/title @p {"text":"Hello world !"}
Example
Example with /say
| /me
| /tm
:
/say Hello world
/execute at @p run say Hello world !
Example with title | teelraw
/title @a title ["",
{
"text":"Hello",
"color":"aqua"
},
{
"text":" world",
"color":"dark_red"
}
]
/tellraw @a ["",
{
"text":"Hello ",
"bold":true,
"color":"dark_red"},
{
"text":"world"
}
]
Advanced
/tellraw @a {
"text":"Hello world",
"bold":true,
"italic":true,
"strikethrough":true,
"underlined":true,
"obfuscated":true,
"clickEvent":{
"action":"run_command",
"value":"/say hello"
},
"hoverEvent":{
"action":"show_text",
"contents":"Hello world"
}
}