Add a player to a scoreboard if they aren't already on it

Add a player to a scoreboard if they aren't already on it - Man in White T-Shirt and Black and White Pants Playing Golf

Sadly, I couldn't find this answer anywhere.

I'm going to refer to [score_deaths=1] as selectors, as I don't know their proper name.

Is there a selector for if a player isn't on a scoreboard (f.e. @a[score_not_on_deaths] or @a[score_deaths!])

Or, even better, is there a way to say player A just joined, he isn't on the scoreboard, /scoreboard players set A deaths 0

Is there a way or a workaround? Also, this is using a /fill clock, so you can only use one command. Thanks!



Best Answer

You can add all players to a scoreboard and keep all other players unaffected by adding 0 to the score for everyone:

/scoreboard players add @a deaths 0

All players without a score will have their score set to zero. All other players will be unaffected.




Pictures about "Add a player to a scoreboard if they aren't already on it"

Add a player to a scoreboard if they aren't already on it - Anonymous female with ball on sports ground
Add a player to a scoreboard if they aren't already on it - Man in White T-Shirt Holding Golf Club
Add a player to a scoreboard if they aren't already on it - Man in White T-Shirt Playing Golf



How do you add players to a scoreboard in Minecraft?

Managing Teams
  • To add a team (in Minecraft 1.12 and older): /scoreboard teams add <teamName> [displayName]
  • To remove a team (in Minecraft 1.12 and older): /scoreboard teams remove <teamName>
  • To assign a player to a team (in Minecraft 1.12 and older): /scoreboard teams join <teamName> [player]




  • Minecraft Scoreboard Command Tutorial [1.18]




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: cottonbro, Anna Shvets, cottonbro, cottonbro