I am trying to send a message to all players that are less than 20 blocks from a command block. I tried this at first:
tell @a[distance=20] Hello
But in the "Previous output" field I can see:
[20:33:21] No player was found
I also tried to add coordinates:
tell @a[x=~0,y=~0,z=~0,distance=20] Hello
But that just marks the command the command as invalid. I would ideally like to be able to set relative coordinates to the command block and require distance to them. What I'm doing is a little "Checkpoint" for adventure map. It should set player's spawnpoint on it's entrance and let them know spawnpoint was set. It uses observers and redstone ore to detect player stepping on it, then it should set the spawn point. I'd rather not use absolute coordinates to make this easier to reuse.