Minecraft – Help with the /tellraw command in minecraft

minecraft-commandsminecraft-java-edition

Recently I've wanted to get into command blocks. Using the tell raw command I want to copy the nearest player's name and then say something after the name.

/tellraw @a [{"selector":"@p"}]

That's what I have right now and I want to add some text behind it. Can anyone help me out?

Best Answer

Add a text component to the list:

/tellraw @a [{"selector":"@p"},{"text":", hello!"}]

Or just a string, which Minecraft allows for text:

/tellraw @a [{"selector":"@p"},", hello!"]