Waypoint Module
Overview
The waypoint module allows you to interact with the Waypoints mod in Lunar Client.
- Ability to display custom waypoints for players on Lunar Client.
- Set exact location highlights using waypoints.
- Custom colors can be provided.
- Supply a custom name for the waypoint.
- Control the ability to remove the waypoint. (They will always have the option to disable the waypoint, even if you prevent it from being deleted client-side.)
- Control if the waypoint is set to be hidden by default.
- Toggle the beam and the block outline highlight.
- Override the on-screen label, icons, scaling, padding, borders, text shadow and distance HUD per waypoint.
- Show or hide an existing waypoint without removing it.

Integration
Sample Code
Explore each integration by cycling through each tab, to find the best fit for your requirements and needs.
Apollo API examples. See General for common patterns and helpers.
Displaying a Waypoint
public void displayWaypointExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> {
this.waypointModule.displayWaypoint(apolloPlayer, Waypoint.builder()
.name("KoTH")
.location(ApolloBlockLocation.builder()
.world("world")
.x(500)
.y(100)
.z(500)
.build()
)
.color(Color.ORANGE)
.preventRemoval(false)
.hidden(false)
.build()
);
});
}Displaying a Waypoint with Text Style
Attach a WaypointTextStyle to override the on-screen label, icons, scaling and distance HUD on a per-waypoint basis. Any field you leave at its default keeps deferring to the player's own Waypoints mod settings — see the Waypoint Options section below for the full list and accepted ranges.
public void displayWaypointWithTextStyle(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> {
this.waypointModule.displayWaypoint(apolloPlayer, Waypoint.builder()
.name("POI")
.location(ApolloBlockLocation.builder()
.world("world")
.x(-500)
.y(100)
.z(-500)
.build()
)
.color(Color.GREEN)
.preventRemoval(false)
.hidden(false)
.textStyle(WaypointTextStyle.builder()
.showIcons(true)
.labelScale(0.5F)
.textIconScale(0.7F)
.build())
.build()
);
});
}Removing a Waypoint
public void removeWaypointExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> this.waypointModule.removeWaypoint(apolloPlayer, "KoTH"));
}Showing or Hiding an Existing Waypoint
Use these to toggle visibility of a waypoint already sent to the client, without removing it.
public void showWaypointExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> this.waypointModule.showWaypoint(apolloPlayer, "KoTH"));
}
public void hideWaypointExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> this.waypointModule.hideWaypoint(apolloPlayer, "KoTH"));
}Resetting all Waypoints
public void resetWaypointsExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(this.waypointModule::resetWaypoints);
}Waypoint Options
.name(String) is the name of the waypoint. Keep in mind this is displayed to players.
.name("KoTH").location(ApolloBlockLocation) is the location of the block the waypoint should display on. See the locations utilities page for more.
.location(ApolloBlockLocation.builder()
.world("world")
.x(500)
.y(100)
.z(500)
.build()
).color(java.awt.Color) is how you dictate the color of the waypoint. See the colors page for more.
Color Types
The java.awt.Color class statically exposes some colors, although they do not correspond to any existing colors used in Minecraft.
.color(Color.CYAN).preventRemoval(String) sets if the player is able to delete the waypoint client-side.
.preventRemoval(false).hidden(Boolean) if the player is able to see the waypoint or not.
.hidden(false).showBeam(Boolean) whether the beacon beam for this waypoint is drawn. Defaults to true.
.showBeam(true).highlightBlock(Boolean) whether the in-world block outline highlight at the waypoint location is drawn. Defaults to true.
.highlightBlock(true).highlightBlockLineWidth(float) line width of the block highlight outline when highlightBlock is enabled. Accepts 1.5F to 7.5F. Leaving the field at its default of 0.0F is treated as a fallback to the player's own configured line width.
.highlightBlockLineWidth(5.0F).textStyle(WaypointTextStyle) overrides for the on-screen label, icons and distance HUD. Leave unset (or null) to defer entirely to the player's own Waypoints mod settings.
.textStyle(WaypointTextStyle.builder()
.showText(true)
.onlyShowTextWhenLookingNear(false)
.showIcons(false)
.textIconScale(1.5F) // 0.1F to 3.0F
.labelScale(1.0F) // 0.1F to 2.0F
.boxPadding(4.0F) // 1.0F to 8.0F
.boxBorders(true)
.textShadow(false)
.showDistance(true)
.build()
)Available options
-
SERVER_HANDLES_WAYPOINTS- Lets servers handle waypoints.
- Values
- Type:
Boolean - Default:
false
- Type:
-
DEFAULT_WAYPOINTS- Sets the default waypoints to send to the player.
- Values
- Type:
List<Waypoint> - Default:
Empty List
- Type:
Automatic Waypoint Creation from Chat
Our Waypoints mod has a built-in feature that allows players to click on coordinates in chat and generate waypoints for those locations, if the coordinates follow specific regex patterns.
Regex Patterns for Waypoint Creation from Chat
The following regex patterns are used to extract coordinates from chat messages. The system will automatically generate waypoints when these patterns match a chat message.
-
Bracket Pattern: Matches coordinates in the format of
"[x, y, z]".- Regex:
\\[(?<x>(?:-|)[0-9.]*), (?<y>(?:-|)[0-9.]*), (?<z>(?:-|)[0-9.]*)] - Chat Example:
[100.5, 64, -200]
- Regex:
-
Title Pattern: Matches coordinates in the format of
"X: x, Y: y, Z: z".- Regex:
\\[(?<x>(?:-|)[0-9.]*), (?<y>(?:-|)[0-9.]*), (?<z>(?:-|)[0-9.]*)] - Chat Example:
X: 123, Y: 65, Z: -320
- Regex: