Minecraft – How to add one title on a scoreboard with two teams

minecraft-java-edition

porvmel

I am still working on the mini game where you kill the other team's leader, then you win. The problem is with the scoreboard. I added two teams, red and blue. The objective is stat.killEntity.Ozelot, so when you kill an ocelot, you get a point, then you win. The problem is when I add them, the title (white letters) always says blue. Can I set it to says stat? But then I can't add both teams; I can't have two stats.

Best Answer

If you want to have 2 separate teams on the scoreboard, create an objective for your scores, I'll use "score" in this example with the command /scoreboard objectives add score dummy Score. Then to test it, do /scoreboard players set Blue score 1, and set the display to sidebar. Then, keep your old objective, and have a clock with command blocks testing for /testfor @a[score_ocelotKill_min=1,team=red] and one for blue, with comparator output to a command block with /scoreboard players add Red score 1` or Blue. It's a bit confusing, but it works.

EDIT: Use 2 command blocks with score_ocelotKill_min=1 and score_wolfKill_min=1 to have an ocelot or wolf. Don't forget to actually setup the scoreboard objectives with /scoreboard objectives add ocelotKill stat.killEntity.Ozelot or /scoreboard objectives add wolfKill stat.killEntity.Wolf