From 2d3d2c468d04eca747d62cb0a4dcff83ca2b360f Mon Sep 17 00:00:00 2001 From: The Judge <53906078+thejudge156@users.noreply.github.com> Date: Wed, 18 Sep 2024 08:28:21 -0700 Subject: [PATCH] Load the right acc --- src/main/java/pojlib/account/Msa.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/pojlib/account/Msa.java b/src/main/java/pojlib/account/Msa.java index 0a1547a4..10d3249c 100644 --- a/src/main/java/pojlib/account/Msa.java +++ b/src/main/java/pojlib/account/Msa.java @@ -48,6 +48,11 @@ public class Msa { public static String mcUuid; public static boolean doesOwnGame; public long expiresAt; + private Activity activity; + + public MinecraftAccount(Activity currentActivity) { + this.activity = activity; + } /** Performs a full login, calling back listeners appropriately */ public MinecraftAccount performLogin(String xblToken) throws MSAException { @@ -60,7 +65,7 @@ public MinecraftAccount performLogin(String xblToken) throws MSAException { fetchOwnedItems(mcToken); checkMcProfile(mcToken); - MinecraftAccount acc = MinecraftAccount.load(mcName, null, null); + MinecraftAccount acc = MinecraftAccount.load(activity.getFilesDir() + "/accounts", null, null); if (acc == null) acc = new MinecraftAccount(); if (doesOwnGame) { acc.accessToken = mcToken; @@ -263,4 +268,4 @@ private static MSAException getResponseThrowable(HttpURLConnection conn) throws } throw new MSAException(conn.getResponseMessage()); } -} \ No newline at end of file +}