0

I have 4 teams red,Blue,Yellow, and Green. I want to automatically detect if there are no players on each of these teams.

What I currently have set up is after three deaths you are removed from your team. when all team members are gone, what command(s) can I use to automatically detect that?

FYI- I'm playing on the latest 1.9 snapshot!

1

You can use 1.9's conditional command blocks along with /testfor.

Set up a repeat/chain line for every team and run

/testfor @a[team=red]
/testforblock ~-1 ~ ~ minecraft:repeating_command_block -1 {SuccessCount:0}

Make sure that the second command points to the position of the first command block. This command exists to invert the "signal".

Place your commands after these two, and set them to conditional, so that they are only executed if the /testforblock succeeds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.