diff --git a/src/main/java/pojlib/API.java b/src/main/java/pojlib/API.java index a45c3ba5..17776ee6 100644 --- a/src/main/java/pojlib/API.java +++ b/src/main/java/pojlib/API.java @@ -8,6 +8,7 @@ import com.google.gson.JsonObject; import pojlib.account.MinecraftAccount; +import pojlib.account.Msa; import pojlib.util.Logger; import pojlib.util.json.MinecraftInstances; import pojlib.util.Constants; @@ -212,7 +213,7 @@ public static void login(Activity activity) } MinecraftAccount acc = MinecraftAccount.load(activity.getFilesDir() + "/accounts"); - if(acc != null && (acc.expiresOn >= System.currentTimeMillis() || !hasWifi || acc.expiresOn == 0)) { + if(acc != null && (acc.expiresOn >= System.currentTimeMillis() || !hasWifi || !Msa.doesOwnGame)) { currentAcc = acc; API.profileImage = MinecraftAccount.getSkinFaceUrl(API.currentAcc); API.profileName = API.currentAcc.username; diff --git a/src/main/java/pojlib/account/MinecraftAccount.java b/src/main/java/pojlib/account/MinecraftAccount.java index a47632fd..40cac30b 100644 --- a/src/main/java/pojlib/account/MinecraftAccount.java +++ b/src/main/java/pojlib/account/MinecraftAccount.java @@ -45,11 +45,15 @@ public static MinecraftAccount load(String path) { } public static String getSkinFaceUrl(MinecraftAccount account) { - try { - return Constants.MINOTAR_URL + "/helm/" + account.uuid; - } catch (NullPointerException e) { - Logger.getInstance().appendToLog("Username likely not set! Please set your username at Minecraft.net and try again. | " + e); - return null; + if (!Msa.doesOwnGame) { + return Constants.MINOTAR_URL + "/helm/MHF_Steve"; + } else { + try { + return Constants.MINOTAR_URL + "/helm/" + account.uuid; + } catch (NullPointerException e) { + Logger.getInstance().appendToLog("Username likely not set! Please set your username at Minecraft.net and try again. | " + e); + return null; + } } } }