Skip to content

Commit

Permalink
Load the right acc
Browse files Browse the repository at this point in the history
  • Loading branch information
thejudge156 authored Sep 18, 2024
1 parent 353ab2f commit 2d3d2c4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/pojlib/account/Msa.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -263,4 +268,4 @@ private static MSAException getResponseThrowable(HttpURLConnection conn) throws
}
throw new MSAException(conn.getResponseMessage());
}
}
}

0 comments on commit 2d3d2c4

Please sign in to comment.