Target Selector Generator
Build @a, @e, @p selectors with filters and see the result.
Selector
Area (optional)
Result
@e[type=zombie,distance=..10,limit=1,sort=nearest]
Selects all entities of type zombie, within distance ..10, limited to 1, sorted nearest.
/kill @e[type=zombie,distance=..10,limit=1,sort=nearest]