1

In Minecraft 1.16.1, I’m trying to make a system thats detects when one of several fake players doesnt have a specific score. Here is my first attempt:

execute unless score sticks_have page-2 matches 2.. unless score plank_have page-2 matches 1.. run ...

After trying this, I realized that all scores need to be in the correct range before it runs the command! But I want it to run the command when any of the scores are in range.

I thought of using the following command, but it doesn’t detect fake players:

execute unless entity @a[scores={sticks_have=2..,plank_have=1..}] run...

I know I can use multiple command blocks, but I would rather not, just do I can conserve space.

What can I do?

  • 1
    psst... the 2nd command also combines the scores using AND, not OR! So even if it could detect fake players, it wouldn't work! – ExpertCoder14 Jun 27 at 3:17
2

Unfortunately, combining if and unless arguments using OR is hard to achieve. Most of the time, you'll have to have one command per possibility. When you have many different possibilities, try using functions1 for each possibility.

1If you are using older versions of Minecraft, you'll need to find the correct version of the page in the history.

A similar problem exists when trying to combine target selector arguments using OR. See the other question here.

| improve this answer | |

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.