I've created a capture-the-flag style map with command blocks, and I've tried to get rid of all the bugs that were in my map. The only thing that still doesn't work, however, is the scoreboard.

When red team scores a point, it will add a point for them on the scoreboard, but it will also add one for the blue team too, which shouldn't happen.

This also happens vice-versa, so if the blue team were to score, the red team would also score at the same time.

A last example would be that if a potato and an egg were on blue team and a chicken and wolf were on red, if red gets 3 points blue will also get 3 points in the scoreboard display of the red team.

Blue team:

(Blue): Potato 1 (true)
(Blue): Egg 1 (true)
(Red): Chicken 1 (false)
(Red): Wolf 1 (false)

Red team :

(Red): Chicken 3 (true)
(Red): Wolf 3 (true)
(Blue): Potato 3 (false)
(Blue): Egg 3 (false)


Commands for blue:

/scoreboard teams add EquipeBleue
/scoreboard objectives setdisplay list PointsBleu
/scoreboard teams option EquipeBleue color blue
/scoreboard teams option EquipeBleue friendlyfire false
/scoreboard objectives add PointsBleu dummy Points Equipe Bleue
/scoreboard players add @a PointsBleu 1

Commands for red:

/scoreboard teams add EquipeRouge
/scoreboard objectives add PointsRouge dummy Points Equipe Rouge
/scoreboard objectives setdisplay sidebar PointsRouge
/scoreboard teams option EquipeRouge color red
/scoreboard teams option EquipeRouge friendlyfire false
/scoreboard players add @a PointsRouge 1
  • You know, saying what the commands are would definitely help. At the moment, it is very unclear. How else are we to understand what's going on? – nine Sep 21 '15 at 0:18
  • Maybe you should add those in your question as an edit, don't you think? – nine Sep 21 '15 at 0:45
  • I got a fast redstone clock to check the red and blue team points too – Fyrens Sep 21 '15 at 0:46
  • Maybe Screenshots will help you to understand ? – Fyrens Sep 21 '15 at 0:50
  • 1
    Hummm ... Maybe If I say it like that you'll understand, The red team points are displayed in the sidebar (At the right of the screen), The Blue team points are displayed in the list (the list of players on the server), the problem is that, blue players are displayed in the sidebar too, and red players are displayed in the list too, so when a blue score it will add points for red players in the list and vice-versa – Fyrens Sep 21 '15 at 1:43

Currently, your command setup has a few problems. You've got two different scoreboard scores for the two teams, displaying those scores in different locations, and adding a point to all players (by using just @a without specifying which players you actually want).

The simple solution is to use a team selector in your point-increment system.

/scoreboard players add @a[team=TeamName] PointsName 1

Boom. Your system, as you have it designed right now, will work. This will select all of the players on TeamName and give them a point in their designated scoreboard.

However, from a design standpoint, there's a much better way to do this by using fake players. To start, set up just one scoreboard and put it in the sidebar:

/scoreboard objectives add points dummy Points
/scoreboard objectives setdisplay sidebar points

Now, the /scoreboard players command doesn't actually require you to specify a player that is online. In fact, that player doesn't even need to exist. But it will happily keep a score for them. So, whenever you want to increment the team score, you can just do this:

/scoreboard players add Team points 1

What this will give you is a scoreboard that keeps track of team points in one entry, in one scoreboard. That way, players can compare, at a glance, what the score is, without needing to rely on the tab menu.

| improve this answer | |
  • Would upvote a second time if I could, because I couldn't say it better myself. – MBraedley Sep 21 '15 at 2:19
  • Thank's ! I'm a begginner in command block stuff xD So i'll need a lot of help :3 Thank's again ! :3 – Fyrens Sep 21 '15 at 2:21

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.