Skip to content

Feature - Add Nametag Visibility Override - #305

Merged
ItsNature merged 1 commit into
version/1.2.9from
feature/nametag-visibility-override
Aug 17, 2026
Merged

Feature - Add Nametag Visibility Override#305
ItsNature merged 1 commit into
version/1.2.9from
feature/nametag-visibility-override

Conversation

@ItsNature

@ItsNature ItsNature commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Overview

Description:
Adds a per-viewer nametag visibility override to the Nametag module.

Changes:

  • New NametagVisibilityOverride enum:
    • SHOWN: displays the nametag as if the target's team nametag visibility were always (still respecting invisibility).
    • HIDDEN: hides the nametag as if it were never, even when the target is not on any team.
    • NONE: keeps the vanilla behavior.
  • New Nametag builder field: visibilityOverride

Code Example:

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

     apolloPlayerOpt.ifPresent(apolloPlayer -> {
         this.nametagModule.overrideNametag(apolloPlayer, target.getUniqueId(), Nametag.builder()
             .lines(Lists.newArrayList(
                 Component.text()
                     .content("[StaffMode]")
                     .decorate(TextDecoration.ITALIC)
                     .color(NamedTextColor.GRAY)
                     .build(),
                 Component.text()
                     .content(target.getName())
                     .color(NamedTextColor.RED)
                     .build()
             ))
+            .visibilityOverride(NametagVisibilityOverride.SHOWN)
             .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 Aug 11, 2026
@ItsNature ItsNature mentioned this pull request Aug 11, 2026
# Conflicts:
#	gradle/libs.versions.toml
@ItsNature
ItsNature force-pushed the feature/nametag-visibility-override branch from b239ba1 to 7139f45 Compare August 17, 2026 12:41
@ItsNature
ItsNature merged commit 60a22d0 into version/1.2.9 Aug 17, 2026
2 checks passed
@ItsNature
ItsNature deleted the feature/nametag-visibility-override branch August 17, 2026 12:47
ItsNature added a commit that referenced this pull request Aug 19, 2026
* Deploy as `1.2.9-SNAPSHOT`

* Feature - Height Limit Module (#300)

* Height Limit Module

* Add default height limit config entry, more callouts & update example

* Document snake_case custom data keys (#301)

* Add `TransferModule#ping` validation & increase `PingRequest` timeout to 10s (#302)

* example(internal): npc visibility tracking (#303)

* Feature - Inventory & Chat Buttons (#304)

* Inventory & Chat Buttons

# Conflicts:
#	gradle/libs.versions.toml

* Add default chat & inventory buttons config option

* Add button docs

* Add button images to docs

* Update inventory.mdx

* Update chat.mdx

* Remove temp gradle publish

---------

Co-authored-by: Trentin <25537885+TrentinTheKid@users.noreply.github.com>

* Add `NametagVisibilityOverride` to `Nametag` (#305)

# Conflicts:
#	gradle/libs.versions.toml

* Sync LunarClient Mods & Options (#307)

* Sync LunarClient Mods & Options

* Update version tags to 1.2.9

---------

Co-authored-by: LunarClient Bot <lc-bot@moonsworth.com>

* Bump to 1.2.9 (#308)

---------

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