1

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.

1 Answer 1

1

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.

9
  • any idea how I can do that? I had a feeling I'd need to do that kind of thing. But once I manage to get everyone sepperate tags like 1 player has tag=P1,p2,p3 etc. When they leave, what if they join back and then 2 people have the tag Jul 20, 2020 at 23:09
  • A simple way is to have a spawn where people pick teams/positions by stepping on pressure plates. Teleport them to the game area as soon as they've chosen. Tags and scores are persistent so you don't need to worry about it after assignments are chosen.
    – peabody
    Jul 21, 2020 at 1:29
  • I actually did think about that, however if someone picks the player 3 pressure plate, and leaves. then someone else joins and also picks player 3, the person when joining back will then still have player 3. Jul 22, 2020 at 23:36
  • You could do something to disable the teleporter when a player picks it, such as setblocking-ing it up or something so they're one-time use.
    – peabody
    Jul 22, 2020 at 23:39
  • 1
    You don't seem to understand what I was saying. Don't "unblock" the portal when they leave. Ever. That's what one-time-use means. When they re-join they will still have the player they chose and no new players can ever pick that player again, they need to pick a different player. Each player position will have its own teleporter.
    – peabody
    Jul 27, 2020 at 0:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .