Staff Mod Module
Overview
The staff mod module allows you to interact with Lunar Client's built in staff mods.
- Ability to grant and remove staff mods found in Lunar Client for players.
- Ability to allow players to enable/disable the X-ray mod.
Allow your staff to use hidden staff only mods, like xray!
Integration
Sample Code
Explore each integration by cycling through each tab, to find the best fit for your requirements and needs.
Enable Staff Mods
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)));
}
Disable Staff Mods
public void disableStaffModsExample(Player viewer) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> this.staffModModule.disableStaffMods(apolloPlayer, Collections.singletonList(StaffMod.XRAY)));
}
enableStaffMods
& disableStaffMods
Parameters
Recipients recipients
- A list of all the player(s) you want to enable or disable the staff mod.
StaffMod.TYPE
- The type of staff mod(s) you want to enable for the
Recipients
player. See the staff mod types section for more.
- The type of staff mod(s) you want to enable for the
StaffMod
Types
XRAY