I'm trying to make player detection in a certain area via delta coordinates (x, y, z - dx, dy, dz) but I can't seem to get it to work properly. The command will result in the player being affected inside the area and/or along a certain axis (y or z) (in one or both directions).

This is the command I'm using:

*/execute @p[x=736,y=56,z=42,dx=754,dy=56,dz=60] ~ ~ ~

This results in detection from x=736,y=56,z=42 and further along the positive axes of x and z.

3 Answers 3


delta is the size of the area, not a second set of coordinates. Use dx=1, dy=1 and dz=1 instead.


oh i know if it is messing with the other players or you,even when your not even close to it. just put execute @p{x=746,y=56,z=42,r=10} r would be the range but if you put a testfor @p it will test for all of the players withing its maximum range even if you put the "x,y, and z" parts. the solution would be to put an R= after the x y and z but in the same bracket and r would be the range starting from the command block or the coordinates set and it will only test for it in that couple of blocks. oh yeah before i knew about how to use the execute command i used to always use the testfor command witch isnt all that bad unless you wanted to spawn or place something within the vicentity of the selected entity witch in that case you would use the execute command.i will upload a vidio on how to use the execute command sometime this month. check it out at "overloadedcreeper 2" on youtube. just so you know, both "overloadedcreeper" and"overloadedcreeper 2" are my youtube channels. its just that i forgot both the username and the password for it so i created a second version.lol i got like 12 yt channels with only 2 main ones wich is overloadedcreeper with or without the "2"


have you tried " /execute @e{type=EXAMPLE} ~ ~ ~ " or tried deleting all the oother parts like the dx dy and dz and just leave the x y and z. i was making a mini game that requires you to spawn a pig to activate a wall or some random effect by using the command "/execute @e{type=pig,r=100} ~ ~ ~ fill ~ ~ ~ ~-10 ~+6 ~ iron_block" in witch the command builds a wall starting from the pig and ends 10 blocks away to the side from where u spawned it. oh and if you don't attach a (chain)command block or regular command block with a repeater separating the two and put /kill in it, it would become a disaster. i did it without the command block killing the pig right after it fills the area(or builds the wall)and the pig just kept on walking placing blocks everywhere and ruined the entire building including some circus or systems i made for it(LOL), and i gave up on making it but when i exited i found another copy and fixed it and now the problem i am facing is uploading the map, because it keeps denying the upload(or un-verifying the upload) and it keeps telling me to "try again some other time". i am so mad right now (lol).

You must log in to answer this question.

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