TransWikia.com

How can I make a command block say a player's name?

Arqade Asked by user181699 on June 6, 2021

How do I make a Minecraft command block to say somebody’s name? I tried doing this:

/say You did it @p! 

Which says in the chat “You did it @p!”.

This occurs on both Pocket Edition and on PC. Here’s a screenshot showing what happens:

Chat text with selector

2 Answers

The reason it doesn't work is that you put a character directly after the @p. So, while:

/say You did it @p!

wouldn't work,

/say You did it @p !

does. Inconvenient, as it does include the space in the message, so it would come out as:

[@] You did it [USERNAME] !

However, I don't know a way around it.

Correct answer by Command newbie on June 6, 2021

You should use /tellraw. /say is not good for anything. example: /tellraw @a {"text":"Congrats you did it","color":"blue","extra":[{"selector":"@p"}]}

Answered by Ádám Kara on June 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP