LunarClient / Apollo

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

Feature - Nick Hider Module #134

Closed ItsNature closed 4 months ago

ItsNature commented 4 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