targetNearestPlayer

fun Mob.targetNearestPlayer(radius: Double = 10.0, filter: (Player) -> Boolean = { true }): Player?

Targets the nearest player within the specified radius.

Return

the targeted player, or null if none was found

Parameters

radius

the maximum distance to search for a player

filter

an optional filter to apply to candidates