Yes there's the @p selector in Minecraft, I wanted to ask if you can limit the @p selector to a certain coordinate. So there are, for example, @p [r = 4] to constrain something to a radius.
Just set the command block where the radius should be
Unfortunately it does not work
If you use the 1.13 this is easy with the following selector
@p [distance = .10, x = 20, y = 4, z = 20]