@minecraft/server / Waypoint
Class: Waypoint ​
Defined in: @minecraft/server/index.d.ts:21021
Base class for waypoints displayed on the player's locator bar. Waypoints can track locations or entities and are rendered with customizable textures and colors.
Waypoints act as shared handles that can be added to multiple players' locator bars. When you modify a waypoint's properties (such as color, texture, or enabled state), the changes are reflected for all players who have that waypoint in their locator bar. This allows you to efficiently manage waypoints across multiple players without creating separate instances for each player.
Extended by ​
Properties ​
color? ​
optionalcolor?:RGB
Defined in: @minecraft/server/index.d.ts:21031
Remarks ​
Optional RGB color tint applied to the waypoint icon. If not specified, the waypoint uses its default color.
This property can't be edited in restricted-execution mode.
isEnabled ​
isEnabled:
boolean
Defined in: @minecraft/server/index.d.ts:21041
Remarks ​
Controls whether the waypoint is currently displayed on the player's screen. When disabled, the waypoint is hidden but remains valid.
This property can't be edited in restricted-execution mode.
isValid ​
readonlyisValid:boolean
Defined in: @minecraft/server/index.d.ts:21048
Remarks ​
Returns whether the waypoint is currently valid. A waypoint becomes invalid when its tracked entity is no longer valid.
textureSelector ​
textureSelector:
WaypointTextureSelector
Defined in: @minecraft/server/index.d.ts:21058
Remarks ​
The WaypointTextureSelector that determines which icon texture is displayed for the waypoint based on distance or other criteria.
This property can't be edited in restricted-execution mode.
Methods ​
getDimensionLocation() ​
getDimensionLocation():
DimensionLocation
Defined in: @minecraft/server/index.d.ts:21074
Returns ​
Remarks ​
Gets the current DimensionLocation of the waypoint. For entity waypoints, this returns the entity's current position. For location waypoints, this returns the stored location.
This function can't be called in restricted-execution mode.
Throws ​
This function can throw errors.
InvalidWaypointTextureSelectorError
remove() ​
remove():
void
Defined in: @minecraft/server/index.d.ts:21084
Returns ​
void
Remarks ​
Removes the waypoint from all locator bars it has been added to. This affects all players who have this waypoint in their locator bar.
This function can't be called in restricted-execution mode.