I'm on the java edition so I don't know if this will work the same way on win 10
/execute as @a[x=,y=,z=,distance=..0.5,nbt={SelectedItem:{id:"minecraft:stick"}}] at @s run ...
another way is to run it like this
/execute if entity @a[x=,y=z=,distance=..0.5,nbt={SelectedItem:{id:"minecraft:stick"}}]
with the second one, you can attach a comparator to the command block and it will work like the "testfor" command from 1.12 or just use the first one of you want to run a command directly.
How do I test if someone is at a certain position, and holding a certain item with /execute?
I'm using Windows 10 if that matters...
I'm on the java edition so I don't know if this will work the same way on win 10
another way is to run it like this
with the second one, you can attach a comparator to the command block and it will work like the "testfor" command from 1.12 or just use the first one of you want to run a command directly.
Command block engineer // Developer // #TeamTrees
It's not working. Is there anything else that would work?
Did you fill in all of the coordinates correctly? I also forgot a comma in the second command
maybe try boosting the distance to 1 or 1.5
Command block engineer // Developer // #TeamTrees