aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java
diff options
context:
space:
mode:
authorkr45732 <52721908+kr45732@users.noreply.github.com>2023-06-08 10:00:04 -0400
committerGitHub <noreply@github.com>2023-06-08 16:00:04 +0200
commit8115922b37e375285c2a72dbdbb5d83fd942e27c (patch)
treee0d6cb5228493e8bb032465cbb2dfd95b4946e43 /src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java
parenta6fb7bfb97d313b665085a52a660150f1da26065 (diff)
downloadnotenoughupdates-8115922b37e375285c2a72dbdbb5d83fd942e27c.tar.gz
notenoughupdates-8115922b37e375285c2a72dbdbb5d83fd942e27c.tar.bz2
notenoughupdates-8115922b37e375285c2a72dbdbb5d83fd942e27c.zip
PV Overhaul (#708)
Co-authored-by: Lulonaut <lulonaut@tutanota.de>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java
index b90e8087..67ed7c7b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java
@@ -20,7 +20,7 @@
package io.github.moulberry.notenoughupdates.util;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.profileviewer.ProfileViewer;
+import io.github.moulberry.notenoughupdates.profileviewer.SkyblockProfiles;
import net.minecraft.client.Minecraft;
import java.util.HashMap;
@@ -31,7 +31,7 @@ public class ProfileApiSyncer {
private final HashMap<String, Long> resyncTimes = new HashMap<>();
private final HashMap<String, Runnable> syncingCallbacks = new HashMap<>();
- private final HashMap<String, Consumer<ProfileViewer.Profile>> finishSyncCallbacks = new HashMap<>();
+ private final HashMap<String, Consumer<SkyblockProfiles>> finishSyncCallbacks = new HashMap<>();
private long lastResync;
public static ProfileApiSyncer getInstance() {
@@ -50,7 +50,7 @@ public class ProfileApiSyncer {
String id,
long timeBetween,
Runnable syncingCallback,
- Consumer<ProfileViewer.Profile> finishSyncCallback
+ Consumer<SkyblockProfiles> finishSyncCallback
) {
resyncTimes.put(id, timeBetween);
syncingCallbacks.put(id, syncingCallback);
@@ -89,8 +89,8 @@ public class ProfileApiSyncer {
if (Minecraft.getMinecraft().thePlayer == null) return;
String uuid = Minecraft.getMinecraft().thePlayer.getUniqueID().toString().replace("-", "");
- NotEnoughUpdates.profileViewer.getProfileReset(uuid, (profile) -> {
- for (Consumer<ProfileViewer.Profile> c : finishSyncCallbacks.values()) c.accept(profile);
+ NotEnoughUpdates.profileViewer.getOrLoadSkyblockProfiles(uuid, (profile) -> {
+ for (Consumer<SkyblockProfiles> c : finishSyncCallbacks.values()) c.accept(profile);
finishSyncCallbacks.clear();
});
}