How do I make it so that a command only runs when I'm at a certain position in Minecraft
I'm trying to make it so that if someone goes to a certain coordinate, it will trigger a boss fight.
I have a chain of commands set up to do this, but it can only activate when I pull a lever. I want to make it so that the chain is only run if the player is at the coordinates, but for some reason the following doesn't work as expected:.
/execute if entity @a[x=-519.5,y=141,z=-258.5] run .
The command I put after run just runs even if I'm not at the specified coordinates. Does anyone know how to make this work? I looked up how /execute works but I actually can't understand why this isn't working.
Question from user VeryHotClara at gaming.stackexchange.com.
More Info Here:
https://questionsanswersonline.com/how-do-i-make-it-so-that-a-command-only-runs-when-im-at-a-certain-position-va-190/
#minecraftcommands #minecraftjavaedition