Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This system assumes that
- a) The dummy scoreboard objective sort exists
- b) An ArmorStand with the CustomName RandomTeams exists
- c) The teams Red and Blue exist (if they are named differently, change the commands accordingly)
- The system can be enabled by running the following command:
- /scoreboard players set @e[type=ArmorStand] sort 1
- =========== THESE COMMANDS HAVE TO BE EXECUTED IN THIS EXACT ORDER! ==========
- /stats entity @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] set AffectedEntities @e[type=ArmorStand,name=RandomTeams] sort
- /execute @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] ~ ~ ~ /testfor @a[team=]
- /stats entity @e[type=ArmorStand,name=RandomTeams] clear AffectedEntities
- /execute @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] ~ ~ ~ /scoreboard teams join Blue @r[team=]
- /execute @e[type=ArmorStand,name=RandomTeams,score_sort_min=1] ~ ~ ~ /scoreboard teams join Red @r[team=]
- ==================
- Good luck!
- - CrushedPixel
Advertisement
Add Comment
Please, Sign In to add comment