Minecraft – How to test for player 1/player 2/player3/ etc in a scoreboard

minecraft-bedrock-editionminecraft-commands

In Minecraft, when displaying a scoreboard as "list" it will show [1] to the left of the person who is on the top of the list. I would like to know how I can test for who has the [1] and [2] and [3]. This is because if I do a individual command for each number, I can prevent commands from affecting the whole server. If you want to provide alternatives, I will accept tag commands aswell like a system so that each player gets their own tag without 2 players having the same thing, this is all I need to know. And multiplayer compatable as this is for a server.

Best Answer

You can apply a score (or tag) to each player then use selector criteria to limit command chains to specific players.

Example:

/scoreboard objectives add team
/scoreboard players set @p team 1
/execute @p[scores={team=1}] ~~~ clear cobblestone

You'll have to invent your own scheme/redstone to get the players to assign themselves specific tags/scores.