Restrict Minecraft @p selector to position?

br
3

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.

Mo

Just set the command block where the radius should be

br

Unfortunately it does not work

Sh

If you use the 1.13 this is easy with the following selector

@p [distance = .10, x = 20, y = 4, z = 20]