Skip to content

@minecraft/server


@minecraft/server / LocationWaypoint

Class: LocationWaypoint ​

Defined in: @minecraft/server/index.d.ts:15583

Waypoint that points to a fixed location in the world. Unlike entity waypoints, location waypoints always remain valid and their position can be updated.

Extends ​

Constructors ​

Constructor ​

new LocationWaypoint(dimensionLocation, textureSelector, color?): LocationWaypoint

Defined in: @minecraft/server/index.d.ts:15589

Parameters ​

dimensionLocation ​

DimensionLocation

textureSelector ​

WaypointTextureSelector

color? ​

RGB

Returns ​

LocationWaypoint

Throws ​

This function can throw errors.

InvalidWaypointTextureSelectorError

Overrides ​

Waypoint.constructor

Properties ​

color? ​

optional color?: 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.

Inherited from ​

Waypoint.color


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.

Inherited from ​

Waypoint.isEnabled


isValid ​

readonly isValid: 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.

Inherited from ​

Waypoint.isValid


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.

Inherited from ​

Waypoint.textureSelector

Methods ​

getDimensionLocation() ​

getDimensionLocation(): DimensionLocation

Defined in: @minecraft/server/index.d.ts:21074

Returns ​

DimensionLocation

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.

InvalidWaypointError

InvalidWaypointTextureSelectorError

Inherited from ​

Waypoint.getDimensionLocation


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.

Inherited from ​

Waypoint.remove


setDimensionLocation() ​

setDimensionLocation(dimensionLocation): void

Defined in: @minecraft/server/index.d.ts:15601

Parameters ​

dimensionLocation ​

DimensionLocation

The new DimensionLocation (dimension and coordinates) for the waypoint.

Returns ​

void

Remarks ​

Updates the dimension and location that this waypoint points to.

This function can't be called in restricted-execution mode.