Manages the collection of waypoints displayed on a player's
locator bar. Allows adding, removing, and querying waypoints
with a maximum capacity limit.
Invalid waypoints in the locator bar will be automatically
removed in the next tick. This includes waypoints tied to
entities that have been removed from the world.
Note: You can control whether vanilla player waypoints are
automatically added to the locator bar using the
playerWaypointsGameRule. Accepted values are
off (players are not shown on the locator bar) and
everyone (all players are visible on the locator bar).
Note: You can only modify, remove, or query waypoints that
were added by this pack.
Example: sharedWaypoint.ts
/* import { world, LocationWaypoint, WaypointTextureSelector, WaypointTexture } from "@minecraft/server"
function sharedWaypoint() { const players = world.getAllPlayers();
if (players.length < 2) { console.warn("Need at least 2 players for this example."); return; }
// Create a single waypoint at a specific location const textureSelector: WaypointTextureSelector = { textureBoundsList: [ { lowerBound: 0, texture: WaypointTexture.Circle } ] };
Adds a waypoint to the locator bar. Throws an error if the
waypoint already exists, the maximum waypoint limit has been
reached, or the waypoint is invalid.
Manages the collection of waypoints displayed on a player's locator bar. Allows adding, removing, and querying waypoints with a maximum capacity limit.
Invalid waypoints in the locator bar will be automatically removed in the next tick. This includes waypoints tied to entities that have been removed from the world.
Note: You can control whether vanilla player waypoints are automatically added to the locator bar using the
playerWaypointsGameRule. Accepted values areoff(players are not shown on the locator bar) andeveryone(all players are visible on the locator bar).Note: You can only modify, remove, or query waypoints that were added by this pack.
Example: sharedWaypoint.ts