diff options
| author | Yasin <a.piri@hotmail.de> | 2024-06-28 20:38:11 +0200 |
|---|---|---|
| committer | Yasin <a.piri@hotmail.de> | 2024-06-28 20:38:11 +0200 |
| commit | 4064dec28cea7a4d47140e08a5c1df097d891563 (patch) | |
| tree | b7d3ff511a885ab3eb4b4372b6e2370a05b86498 /src/main/java/de/hysky/skyblocker/utils | |
| parent | 1884bdf9e879d009e09cfd7b5b5123691ea81856 (diff) | |
| download | Skyblocker-4064dec28cea7a4d47140e08a5c1df097d891563.tar.gz Skyblocker-4064dec28cea7a4d47140e08a5c1df097d891563.tar.bz2 Skyblocker-4064dec28cea7a4d47140e08a5c1df097d891563.zip | |
Compatibility with "No Chat Report"
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/utils')
| -rw-r--r-- | src/main/java/de/hysky/skyblocker/utils/ApiAuthentication.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/hysky/skyblocker/utils/ApiAuthentication.java b/src/main/java/de/hysky/skyblocker/utils/ApiAuthentication.java index fbf814ee..5f65c336 100644 --- a/src/main/java/de/hysky/skyblocker/utils/ApiAuthentication.java +++ b/src/main/java/de/hysky/skyblocker/utils/ApiAuthentication.java @@ -7,6 +7,8 @@ import java.util.Base64; import java.util.Objects; import java.util.UUID; +import de.hysky.skyblocker.mixins.accessors.MinecraftClientAccessor; +import net.minecraft.client.session.ProfileKeys; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -56,8 +58,9 @@ public class ApiAuthentication { * was generated by Mojang and is tied to said player. For information about what the randomly signed data is used for and why see {@link #getRandomSignedData(PrivateKey)} */ private static void updateToken() { + ProfileKeys profileKeys = ((MinecraftClientAccessor) CLIENT).getProfileKeys(); //The fetching runs async in ProfileKeysImpl#getKeyPair - CLIENT.getProfileKeys().fetchKeyPair().thenAcceptAsync(playerKeypairOpt -> { + profileKeys.fetchKeyPair().thenAcceptAsync(playerKeypairOpt -> { if (playerKeypairOpt.isPresent()) { PlayerKeyPair playerKeyPair = playerKeypairOpt.get(); |
