LunarClient / Apollo

Next-generation Lunar Client server API
https://lunarclient.dev
MIT License
92 stars 18 forks source link

Feature - Nick Hider Module #134

Closed ItsNature closed 8 months ago

ItsNature commented 8 months ago

Overview

Description: The Nick Hider module allows you to interact with the Nick Hider mod.

Code Example:

Override the nick for a specific player

public void overrideNickExample(Player viewer) {
    Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
    apolloPlayerOpt.ifPresent(apolloPlayer -> this.nickHiderModule.overrideNick(apolloPlayer, "Notch"));
}

Reset the nick for a specific player

public void resetNickExample(Player viewer) {
    Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
    apolloPlayerOpt.ifPresent(this.nickHiderModule::resetNick);
}

Review Request Checklist