I successfully registered teams (Red, Blue). I want to add players to the team. It currently is 3v3 map, where you need to have 6 players to play otherwise the game wont start at all. So i tried something like this, since i knew there are 6 players online, else the redstone signal wouldnt even have reached the "Add player to team"-Command block.

scoreboard teams join Blue @r works, adds 1 player to the team. Now i could just execute this block 3 times and the Blue team would have 3 players. Problem is, that @r randoms a player and it might happen that player Shiuyin would be rolled twice, thus the Blue team would end up having Shiuyin + another random player instead of 3.

I also tried something like

"scoreboard teams join Blue @r,@r,@r"

which gives a lot of bugs, something teams do have players "Player1, Player2, @r".

So i need something like "scoreboard teams join Blue @r" executed 3 times which only adds player who are currently not in a team.

I tried "scoreboard teams join Blue @r[team!=Blue]" but it somehow doesn't work.

Any solutions?


Use scoreboard teams join Blue @r[team=!Blue], You just had the syntax a little bit wrong.

For 1.13 and above: team join Blue @r[team=!Blue]


Keep them in a little room to assign them, and once they are done move them to the arena. Then for the command block run this three times:

scoreboard teams join Blue @r[r=5]

Put the command block at the center of the room. The room should be no larger than 7x7x2, and once a player is assigned he should be moved out of the room and into the arena so he will not be reassigned by being within the 5 block radius of the command block.