Skip to content

@pumpkin-plugins/waypoints API / placeholders/queries / nearestWaypoint

Function: nearestWaypoint() ​

nearestWaypoint(waypoints, viewer, rank): Waypoint | undefined

Defined in: packages/waypoints/src/placeholders/queries.ts:61

Selects a 1-based accessible same-world rank after sorting by raw 3D distance and UUID.

Parameters ​

waypoints ​

readonly Waypoint[]

viewer ​

WaypointQueryViewer

rank ​

number

Returns ​

Waypoint | undefined

pumpkin-plugins documentation