Skip to content

Feature - Markers Module#293

Open
ItsNature wants to merge 7 commits into
version/1.2.8from
feature/markers
Open

Feature - Markers Module#293
ItsNature wants to merge 7 commits into
version/1.2.8from
feature/markers

Conversation

@ItsNature

@ItsNature ItsNature commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Overview

Description:
Add Marker Module, exposing Lunar Client's in-world Markers mod to servers. Until now markers were purely player-driven (middle-click / keybind); this lets a server place, update, and remove them programmatically, at any location, with per-marker overrides.

Full docs: lunarclient.dev/apollo/developers/modules/marker

Changes:

  • Add MarkerModule API
    • displayMarker(Recipients, Marker)
    • removeMarker(Recipients, String)
    • removeMarker(Recipients, Marker)
    • resetMarkers(Recipients)
  • Add Marker builder: id, location, ownerId, ownerName, flag, color, target, duration, inGameNotification, chatNotify, middleClickRemove and style
  • Add MarkerTarget types describing what is marked: ItemMarkerTarget, BlockMarkerTarget, EntityMarkerTarget and PlayerMarkerTarget
  • Add MarkerStyle builder for per-marker appearance: scale, animateMarkerOnHover, compactMode, textShadow, ownerSuffix, ownerDisplay, showOwner, showCoordinates, showDistance, showDescription and descriptionDisplay

Code Example:

  public void displayBlockMarkerExample(Player viewer) {
      Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());

      apolloPlayerOpt.ifPresent(apolloPlayer -> {
          Location location = viewer.getLocation();

          this.markerModule.displayMarker(apolloPlayer, Marker.builder()
              .id("loot-chest")
              .location(ApolloLocation.builder()
                  .world(location.getWorld().getName())
                  .x(location.getX())
                  .y(location.getY())
                  .z(location.getZ())
                  .build())
              .ownerId(viewer.getUniqueId())
              .ownerName("")
              .flag(MarkerFlag.INTEREST)
              .target(BlockMarkerTarget.builder()
                  .itemStack(ItemStackIcon
                      .builder()
                      .itemName("minecraft:chest")
                      .build())
                  .build())
              .duration(Duration.ofSeconds(60))
              .style(MarkerStyle.builder()
                  .showOwner(MarkerDisplayCondition.NEVER)
                  .showDescription(MarkerDisplayCondition.ALWAYS)
                  .build())
              .build()
          );
      });
  }

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 added type: Documentation Documentation improvement or issue type: Enhancement Feature improvement or addition labels Jun 17, 2026
# Conflicts:
#	example/bukkit/json/src/main/java/com/lunarclient/apollo/example/json/util/JsonPacketUtil.java
#	example/bukkit/proto/src/main/java/com/lunarclient/apollo/example/proto/util/ProtobufPacketUtil.java
@ItsNature ItsNature mentioned this pull request Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Documentation Documentation improvement or issue type: Enhancement Feature improvement or addition

Development

Successfully merging this pull request may close these issues.

3 participants