I'm Trying to make a door that opens when you shoot an arrow in the middle, but I can't find a way to add coordinates to the parameters. Is there a way? (the current working command is /testfor @e[type=Arrow] )


You should use the x, y, z and r parameters to search radius r from point xyz. These specific arguments can actually be compressed so long as they are in that order, so your command can look like this:

/testfor @e[x=10,y=64,z=10,r=1,type=Arrow]

Or this:

/testfor @e[10,64,10,1,type=Arrow]

You can also use dx, dy, and dz instead of r if you want to create a cuboid search area. For a 3*3*3 box centered at 10,64,10 you would do:

/testfor @e[x=9,y=63,z=9,dx=3,dy=3,dz=3,type=Arrow]

Not the answer you're looking for? Browse other questions tagged or ask your own question.