Skip to main content

Developers

Maven & Gradle

HexNicks is hosted in Majekdor's Maven Repository here.

Maven

<repositories>
<repository>
<id>majek-repo</id>
<url>https://repo.majek.dev/releases/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>dev.majek</groupId>
<artifactId>hexnicks</artifactId>
<version>3.1.1</version>
<scope>provided</scope>
</dependency>
</dependencies>

Gradle

repositories {
maven {
url "https://repo.majek.dev/releases/"
}
}

dependencies {
compileOnly "dev.majek:hexnicks:3.1.1"
}

API

HexNicks does have an api and all commands trigger an event when executed. These events can be listened to the same way as other Bukkit events. You can see the events here and all JavaDocs here.

Event example:

@EventHandler
public void onNickname(SetNickEvent event) {
Player player = event.player();
player.sendMessage("Setting nickname...");
event.newNick(Component.text("New nickname"));
}

There are multiple ways to retrieve nicknames, but the easiest way is:

HexNicks.api().getStoredNick(player); // You can pass thru a player, offlineplayer, or uuid