diff options
| author | Roman / Linnea Gräf <roman.graef@gmail.com> | 2022-09-29 17:25:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-29 17:25:37 +0200 |
| commit | 2dd4a2b36211c380c0bf4e231859dfafd3c04a5b (patch) | |
| tree | 20cde26c05f32699ccb91cda1d37b67f4eea6c62 /src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java | |
| parent | cbcc4c3b4004cbf3f86aeab515ea94a93b4efd1e (diff) | |
| download | notenoughupdates-2dd4a2b36211c380c0bf4e231859dfafd3c04a5b.tar.gz notenoughupdates-2dd4a2b36211c380c0bf4e231859dfafd3c04a5b.tar.bz2 notenoughupdates-2dd4a2b36211c380c0bf4e231859dfafd3c04a5b.zip | |
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 <nopotheemail@gmail.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/HotmInformation.java | 12 |
1 files changed, 5 insertions, 7 deletions
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<String, String>() {{ - 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); } } |
