findNearestEntity

abstract fun findNearestEntity(searchEntity: SearchEntity, callback: Consumer<Entity>)

Asynchronously finds the nearest Entity for the given SearchEntity by comparing all EntityZones against the user's last known position. The nearest entity is returned via the provided callback.

Parameters

searchEntity

the search entity containing one or more entity zones

callback

callback that receives the nearest Entity, or null if not found