Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 1.42 KB

File metadata and controls

49 lines (39 loc) · 1.42 KB

Hypixel Public API - Reactive Transport

Usage

<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'
}

Example code

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);
    }
}

Dependencies

This transport depends on the following: