How can I set players to different teams?
Solution 1:
If you want them to put the command, have them say "/team join red". If they step on a pressure plate, put a command block under the block the plate is on and have the command /execute at @p run team join red or /execute at @p run team join blue. dissecting this...
execute: execute a command with special parameters
at: execute at an entity
@p: the nearest person
run: run a command
team: the teams command
join: join a team
red: the name of the team
as SpiceWeasel said...
If you join a team but you were already on a team, you will leave the first team to join the second.
so, this method should allow you to keep all your teams' players in a row. GLHF