Nearest Entity (Expression) — Skript
Addon: Skript · Category: Expression · Since: 2.7
Syntax
[the] (nearest|closest) %*entity types% [[relative] to %entity/location%]Description
Gets the entity nearest to a location or another entity.
Examples
kill the nearest pig and cow relative to playerteleport player to the nearest cow relative to playerteleport player to the nearest entity relative to playeron click:
kill nearest pig