diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 15:14:03 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-23 15:14:03 +0100 |
| commit | d341829214683e1dfb9009da1120f3dae290a8f1 (patch) | |
| tree | 5599eb52a673c7eda7016c287a00bc50c943eee0 /src/main/java/at/hannibal2/skyhanni/data | |
| parent | fc824ace3d40a6392f05f626887d7bfe80c04eb9 (diff) | |
| download | skyhanni-d341829214683e1dfb9009da1120f3dae290a8f1.tar.gz skyhanni-d341829214683e1dfb9009da1120f3dae290a8f1.tar.bz2 skyhanni-d341829214683e1dfb9009da1120f3dae290a8f1.zip | |
Added LorenzUtils.getPlayerUuid
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt b/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt index e7f15854a..d3b6a4e29 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ApiDataLoader.kt @@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.events.ProfileApiDataLoadedEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.utils.APIUtil import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.StringUtils.toDashlessUUID import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext @@ -30,7 +29,7 @@ class ApiDataLoader { nextApiCallTime = System.currentTimeMillis() + 60_000 * 5 SkyHanniMod.coroutineScope.launch { val apiKey = SkyHanniMod.feature.hidden.apiKey - val uuid = Minecraft.getMinecraft().thePlayer.uniqueID.toDashlessUUID() + val uuid = LorenzUtils.getPlayerUuid() loadProfileData(apiKey, uuid, currentProfileId) } } @@ -56,7 +55,7 @@ class ApiDataLoader { } private suspend fun tryUpdateProfileDataAndVerifyKey(apiKey: String): Boolean { - val uuid = Minecraft.getMinecraft().thePlayer.uniqueID.toDashlessUUID() + val uuid = LorenzUtils.getPlayerUuid() val url = "https://api.hypixel.net/player?key=$apiKey&uuid=$uuid" val jsonObject = withContext(Dispatchers.IO) { APIUtil.getJSONResponse(url) } |
