Channel Icon

Crazy Ozz

Official Channel Website

Command Block

How to Show Player Name in /tellraw in Minecraft

Minecraft Java 1.21+ and 26+ – Tellraw Selector Example (@p, @s, @a)

Want to automatically display a player’s name inside a Minecraft message? In this tutorial you’ll learn how to use the /tellraw command with selectors to show the player nickname using @p, @s or @a. This is perfect for RPG systems, minigames, automatic announcements and datapacks. Works in Minecraft Java Edition 1.21+ and newer versions like 26+.

Adding the player's name in a tellraw command is easy, check the command below

tellraw @a [{"text":"Name: ","color":"green"},{"selector":"@p","color":"white"},{"text":"\nText continues here","color":"gold"}]

Just end the first text and then add {"selector":"@p","color":"white"}

After that, continue the text with a comma. The \n is used to go to the next line

Discover CastroTools

Looking for more online tools? CastroTools offers a JSON formatter, QR code generator, image and audio converters, password generator, calculators, and much more, all free and easy to use.

🚀 Explore CastroTools

Still have questions? Watch the video below