How do I teleport players based on their teams?

Solution 1:

Information taken from the wiki:
http://minecraft.gamepedia.com/Scoreboard#Teams


To teleport players in specific teams, simply add the team=[name] filter onto the @p command, resulting in:

/tp @a[r=10,team=red] 100 100 -100

Just note that everything is CaSe SeNsItIvE (Case sensitive). It means that 'red' is different to 'Red'. Replace the word 'red' with the name of the team.


To set make team, use
/scoreboard teams add [name] [display name... (This can be more than one word)]

And to add a player to the team, use
/scoreboard teams join [team] [player]