How do I set up command blocks to teleport the winning team?
The command to check if anyone on team red
has killed an ocelot is
/testfor @a[score_leader_stat=1, team=red]
Note that there's an underscore between score
and leader_stat
, not an equal sign!
Get the output of that command block and hook it into two other command blocks with
/tp @a[team=red] x y z
/tellraw @a {text:"Red Team has slain the Ocelot!", color:red}
In a 1.8 snapshot, you could also use
/title @a title {text:"Red Team has slain the Ocelot!", color:red}
to get a large text display. You will need a set of such command blocks for every team and every possible leader. Note that if red team's leader is an Ocelot as well, they will also win the game by killing their own leader.