Skip to content

StaffMod Module Improvements - Add enabledByDefault#296

Merged
ItsNature merged 3 commits into
version/1.2.8from
improvement/staffmod-enable-by-default
Jun 25, 2026
Merged

StaffMod Module Improvements - Add enabledByDefault#296
ItsNature merged 3 commits into
version/1.2.8from
improvement/staffmod-enable-by-default

Conversation

@ItsNature

@ItsNature ItsNature commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Overview

Description:
Adds an enabledByDefault parameter to the Staff Mod Module's enable methods so servers can choose whether granting a staff mod also activates it on the player's client.

Changes:

  • New methods on StaffModModule:
    • StaffModModule#enableStaffMods(Recipients, List<StaffMod>, boolean enabledByDefault)
    • StaffModModule#enableAllStaffMods(Recipients, boolean enabledByDefault)
  • The existing no-flag overloads delegate with enabledByDefault set as false.

Code Example:

  public void enableStaffModsExample(Player viewer) {
      if (!viewer.hasPermission("apollo.staff")) {
          return;
      }

      Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
      apolloPlayerOpt.ifPresent(apolloPlayer -> this.staffModModule.enableStaffMods(apolloPlayer, Collections.singletonList(StaffMod.XRAY), true));
  }

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)

…t)` & `StaffModModule#enableAllStaffMods(recipients, enabledByDefault)`
@ItsNature ItsNature added type: Documentation Documentation improvement or issue type: Enhancement Feature improvement or addition labels Jun 23, 2026
@ItsNature ItsNature mentioned this pull request Jun 23, 2026
@ItsNature ItsNature merged commit f53ffa5 into version/1.2.8 Jun 25, 2026
1 check passed
@ItsNature ItsNature deleted the improvement/staffmod-enable-by-default branch June 25, 2026 00:19
ItsNature added a commit that referenced this pull request Jun 27, 2026
* Add `StaffModModule#enableStaffMods(recipients, mods, enabledByDefault)` & `StaffModModule#enableAllStaffMods(recipients, enabledByDefault)`

* Apply changes from optimizations PR
ItsNature added a commit that referenced this pull request Jul 1, 2026
* Deploy as `1.2.8-SNAPSHOT`

* Add `ALLOW_DIG_AND_USE` to Combat Module (#290)

* Add CombatModule#ALLOW_ATTACK_AND_USE

* Update supported versions docs for the ALLOW_ATTACK_AND_USE option

* Rename to `allow-dig-and-use` & add anticheat callout

* Update combat.mdx

---------

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

* Add `ServerlinkModule#LEGACY_BUTTON_PLACEMENT` & `ServerLinkModule#MODERN_BUTTON_PLACEMENT` (#291)

* Optimizations (#294)

* Optimize `EventBus#post`

* Optimize packet broadcasting

* Optimize `Option#getKey`

* Optimize `ApolloWorld#getPlayers`

* Optimize `NetworkOptions#sendOption`

* Avoid streams in packet/recipient conversions

* Remove dead repo

* Add `CombatModule#DISABLE_BLOCK_MISS_PENALTY` (#297)

* StaffMod Module Improvements - Add `enabledByDefault` (#296)

* Add `StaffModModule#enableStaffMods(recipients, mods, enabledByDefault)` & `StaffModModule#enableAllStaffMods(recipients, enabledByDefault)`

* Apply changes from optimizations PR

* Feature - Markers Module (#293)

* 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>

* Sync LunarClient Mods & Options (#298)

* Sync LunarClient Mods & Options

* Update version tags to 1.2.8

---------

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

* Bump to 1.2.8 (#299)

---------

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