Skip to content

Feature - Markers Module#293

Merged
ItsNature merged 14 commits into
version/1.2.8from
feature/markers
Jun 27, 2026
Merged

Feature - Markers Module#293
ItsNature merged 14 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
@ItsNature ItsNature merged commit 95a89f7 into version/1.2.8 Jun 27, 2026
1 check passed
@ItsNature ItsNature deleted the feature/markers branch June 27, 2026 18:53
ItsNature added a commit that referenced this pull request Jun 27, 2026
* Add Marker API classes

* Marker Module Impl

* Add examples and docs

# 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

* Rename loot chest example to display block example

* Publish branch

* add marker overview gif

* add overview gif to marker docs

* Relocate compact mode callout

* Remove dead repo

* Update markers gif

* Use apollo-protos 0.2.0

* Apply changes from optimizations PR

* Remove temp publish

---------

Co-authored-by: Trentin <25537885+TrentinTheKid@users.noreply.github.com>
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