Hypixel API
Makes a request to the Hypixel API player endpoint.
final String apiKey = "apiKey";
final String uuid = "90c835a0879e444dbc9238d241ca795c";
void onEnable() {
client.async(() -> {
Request request = new Request("GET", "https://api.hypixel.net/v2/player?uuid=" + uuid);
request.addHeader("API-Key", apiKey);
Response response = request.fetch();
int code = response.code();
if (code == 200) {
Json json = response.json();
} else {
client.print("Error: " + code);
}
});
}
Last updated