like the title says, I'm looking for a way to display a player name in a /tellraw command which is run by a command block. Example:
/tellraw @a {"text":"","extra":[{"text":"A player has won the game!","color":"blue"}]}
And the output is something like this:
A player has won the game!
But I want the output to be something like
JasonSPQR has won the game!
Using the @p parameter
Best Answer
Tellraw allows for a "selector" part, which takes any selector you want and displays a name. You should do:
This will only work in 1.8 snapshots and above. There is no way to do this in older versions.