So, I’ve looked all over for solutions to this issue and they all say to use /testfor @a[x=X, y=Y, z=Z, r=R, name=playername] But this doesn’t do anything for me. I’m using a repeating command block set to “always on” and it doesn’t do anything with those parameters. The only way it works for me is if it’s only the radius parameter and nothing else. What do I do?? I don’t have any idea why it doesn’t work.
1 Answer
/testfor @a[x=X, y=Y, z=Z, r=R, name=playername]
is for an older version of minecraft - in 1.13/1.14 you use the /execute
command.
For this you would use the command /execute if entity <Selector>[x=<X>, y=<Y>, z=<Z>, distance=..<Distance>, name=<Name>] run <Command>
.
This will run <Command>
if a <Selector>
called <Name>
stands in the position <X>
, <Y>
, <Z>
up to <Distance>
blocks away.