I'm working on a map in Bedrock Edition, and I need to have a command block at the end that says "Congratulations [player], you win!" Because it's a map, I cant just have it say a specific player's name, and I've seen maps that do exactly what I want mine to do. How do I format the command to allow this?
Minecraft – How to make a command block say the nearest player’s name in chat in MC Bedrock Edition
minecraft-bedrock-editionminecraft-commands
Related Topic
- Minecraft – /setblock a command block with nearest player’s name inside
- Minecraft – How to clear a minimum amount of items from a player’s inventory in Minecraft Bedrock Edition
- Minecraft – How to put a player’s name in a /title command
- Minecraft – the Java Edition method of Bedrock Edition’s /ride command
Best Answer
You can do it with this command:
You can use any other target selector if you prefer that, you can even use @a, or @e, which will return a list with all the specified players/entities, separated by
,
.This, for example, will say "Congratulations Pig, Pig, Pig, you win", if there are 3, or more pigs in your world and you havenĀ“t renamed them: