From 2dd4a2b36211c380c0bf4e231859dfafd3c04a5b Mon Sep 17 00:00:00 2001 From: Roman / Linnea Gräf Date: Thu, 29 Sep 2022 17:25:37 +0200 Subject: Add custom keystore and refactor HypixelApi.java (#318) * Add custom keystore and refactor HypixelApi.java * Fix inputstream leak (+ less console spam) * Fix HOTM crash * Use api selected variable to find best profile * Number formatting * Make old profiles show again Co-authored-by: nopo --- .../moulberry/notenoughupdates/util/HotmInformation.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java index c97a37d9..1968b51e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java @@ -159,13 +159,11 @@ public class HotmInformation { public synchronized void requestUpdate(boolean force) { if (updateTask.isDone() || force) { - updateTask = neu.manager.hypixelApi.getHypixelApiAsync( - neu.config.apiData.apiKey, - "skyblock/profiles", - new HashMap() {{ - put("uuid", Minecraft.getMinecraft().thePlayer.getUniqueID().toString().replace("-", "")); - }} - ).thenAccept(this::updateInformation); + updateTask = neu.manager.apiUtils + .newHypixelApiRequest("skyblock/profiles") + .queryArgument("uuid", Minecraft.getMinecraft().thePlayer.getUniqueID().toString().replace("-", "")) + .requestJson() + .thenAccept(this::updateInformation); } } -- cgit