How do I create a random team chooser for Minecraft?

How do I create a random team chooser for a Minecraft server?

For example: When you step on a block, you are automatically assigned to a random team: transported to that team’s side of the building, given team-coloured armour etc.

  • How can I get out of the lava without dying?
  • Adding Minecraft to Steam with 64bit JRE
  • How can I make a random number generator with command blocks in Minecraft?
  • “Unknown Host” Bukkit 1.7.10
  • How can I set up a language filter for Minecraft?
  • How far away do portals need to be so that they don't go to the same place?
  • Minecraft Failed To Bind Port
  • Where's all this light coming from?
  • What is a 'chunk'?
  • Is there a mod / bukkit plugin to fine-tune mobspawners in SMP?
  • Are light-level restrictions on spawning different in the Nether?
  • My Custom Skin won't Change
  • One Solution collect form web for “How do I create a random team chooser for Minecraft?”

    So the easiest way to do this is to capture players at spawn with a contraption like this:

    enter image description here

    This is a large area (the whole of the spawn chunk) laced with tripwires. When a new player joins, they land here and it triggers command blocks. These command blocks:

    • Teleport the player away from spawn
    • Set the player’s spawn point
    • Set up their team, etc.

    You can do this with a pressure pad instead, but this way makes it easier to automate, so you don’t have people floating around who aren’t in teams (unless you want this).

    What you would need to do is combine this with a rapid pulsar – essentially a very fast ticking clock that is switching between two different sets of command blocks (or however many sets you want). Depending on which set of command blocks is enabled when the player spawns, they will be assigned a different team.

    Other options include simply alternating – which makes sure that the teams are balanced. This would work by simply using a T flip-flop to switch the command block banks each time.

    We love Playing Games, especially Video Games.