Guest User

Minecraft Teams Randomizer System

a guest
Feb 9th, 2015
3,033
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This system assumes that
  2. a) The dummy scoreboard objective sort exists
  3. b) An ArmorStand with the CustomName RandomTeams exists
  4. c) The teams Red and Blue exist (if they are named differently, change the commands accordingly)
  5.  
  6. The system can be enabled by running the following command:
  7. /scoreboard players set @e[type=ArmorStand] sort 1
  8.  
  9. =========== THESE COMMANDS HAVE TO BE EXECUTED IN THIS EXACT ORDER! ==========
  10.  
  11. /stats entity @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] set AffectedEntities @e[type=ArmorStand,name=RandomTeams] sort
  12.  
  13. /execute @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] ~ ~ ~ /testfor @a[team=]
  14.  
  15. /stats entity @e[type=ArmorStand,name=RandomTeams] clear AffectedEntities
  16.  
  17. /execute @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] ~ ~ ~ /scoreboard teams join Blue @r[team=]
  18.  
  19. /execute @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] ~ ~ ~ /scoreboard teams join Red @r[team=]
  20.  
  21. ==================
  22.  
  23. Good luck!
  24. - CrushedPixel
Advertisement
Add Comment
Please, Sign In to add comment