Skip to content

Waypoints - Add WaypointTextStyle#283

Open
ItsNature wants to merge 1 commit into
version/1.2.7from
improvement/waypoint-module
Open

Waypoints - Add WaypointTextStyle#283
ItsNature wants to merge 1 commit into
version/1.2.7from
improvement/waypoint-module

Conversation

@ItsNature
Copy link
Copy Markdown
Collaborator

@ItsNature ItsNature commented May 20, 2026

Overview

Description:
Adds per-waypoint label/HUD overrides, beam and block-outline toggles, and show/hide controls for waypoints already sent to the client.

Changes:

  • New WaypointTextStyle builder: (showText, onlyShowTextWhenLookingNear, showIcons, textIconScale, labelScale, boxPadding, boxBorders, textShadow, showDistance).
  • New Waypoint builder fields: showBeam, highlightBlock, highlightBlockLineWidth
  • New WaypointModule API: showWaypoint(Recipients, String) & hideWaypoint(Recipients, String).

Code Example:
Displaying a Waypoint with Text Style

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()
        );
    });
}

Showing or Hiding an Existing Waypoint

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"));
}

Review Request Checklist

  • Your code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have tested this change myself. (If applicable)
  • I have made corresponding changes to the documentation. (If applicable)
  • The branch name follows the projects naming conventions. (e.g. feature/add-module & bugfix/fix-issue)

@ItsNature ItsNature force-pushed the improvement/waypoint-module branch from 27d2abc to d98ce00 Compare May 20, 2026 20:08
@ItsNature ItsNature mentioned this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants