Commands let players perform actions and customize gameplay using text-based instructions. Use this topic to share feedback and ideas for improving commands and related tools.

0

@a in 'execute if score'

1 Comments

Post a new comment:

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    Hi! Thanks for submitting an idea, but this is actually already possible with commands in Minecraft!

    Have you tried the following command? It should be able to do what you've asked for in the suggestion. For example, to test if all players have an objective score of 10:

    execute unless entity @a[scores={objective=..9}] unless entity @a[scores={objective=11..}] run …

    This command works because it tests to see if no players have a score of 9 or below, and also tests to see if no players have a score of 11 or above. If both those tests pass, it means everybody has a score of 10!

    Unfortunately, this test also passes if there are no online players. To fix this, you might to add if entity @a[scores={objective=10}] to the end of the command.