Minecraft – How to make a command block say a player’s name

minecraft-bedrock-editionminecraft-commands

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

Best Answer

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.

Related Topic