How do I /tp or /give players at certain coordinates?
Inside command blocks (and probably the chat, too), you can use key=value
arguments. x=
, y=
and z=
are supported arguments. r=
can be used to specify the radius around the coordinates to look in.
To select one singular player at X=20 and Z=80 (with a 1 block radius/margin):
@p[x=20,z=80,r=1]
To select all entities within 3 blocks of X=-90, Y=64 and Z=0:
@e[x=-90,y=64,z=0,r=3]
Hope this helps.