<dependency>
<groupId>net.hypixel</groupId>
<artifactId>hypixel-api-transport-reactor</artifactId>
<version>4.4</version>
</dependency>
Can also be included with Gradle.
dependencies {
implementation 'net.hypixel:hypixel-api-transport-reactor:4.4'
}
public class Main {
public static void main(String[] args) {
HypixelHttpClient client = new ReactorHttpClient(UUID.fromString("your-api-key-here"));
HypixelAPI hypixelAPI = new HypixelAPI(client);
hypixelAPI.getPlayerByName("Hypixel")
.exceptionally(throwable -> {
// Handle exceptions here
throwable.printStackTrace();
return null;
})
.thenAccept(System.out::println);
}
}
This transport depends on the following:
- Google Gson library - 2.10.1 (for hypixel-api-core)
- Reactor Core 3.4.5 (for reactor netty)
- Reactor Netty (project-reactor):