How to detect proximity of two entities?

I am trying to detect if an item is near a player. How can I do this? Also, if possible, how do you in general detect the proximity of two entities?


Solution 1:

You can test for items nearby a player

/execute @a ~ ~ ~ testfor @e[r=RADIUS]

For other commands just use the r=RADDIUS selector.