-1

How do I test for a player being in a world? I have 2 command blocks: the second one is conditional and relies on the first one to be correct for it to work. In the first command, I have this: /execute if entity (player) in minecraft:the_nether run say test, yet it says test every time even if the player is not in the nether.

1

1 Answer 1

4

Here is what your old command is actually doing.

execute                    
  if entity X              # If entity X exists...
  in minecraft:the_nether  # move the execution position to the Nether...
run say test               # and say a message

You'll need to use a similar approach to this question and answer.

execute
  in minecraft:the_nether   # In The Nether...
  if entity @p[x=0]         # if there is any player in the dimension...
run say test                # then say a Message. 

Not the answer you're looking for? Browse other questions tagged .