From 7437ce6798e25394b385310401f39ea415aab119 Mon Sep 17 00:00:00 2001 From: 0xTas Date: Sat, 12 Oct 2024 11:15:01 -0700 Subject: [PATCH] Fixed the alt manager's incidental limit of 3 Microsoft accounts. --- .../meteorclient/gui/widgets/WAccount.java | 2 +- .../meteorclient/systems/accounts/Accounts.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/gui/widgets/WAccount.java b/src/main/java/meteordevelopment/meteorclient/gui/widgets/WAccount.java index 1c4d3ef640..45458bb974 100644 --- a/src/main/java/meteordevelopment/meteorclient/gui/widgets/WAccount.java +++ b/src/main/java/meteordevelopment/meteorclient/gui/widgets/WAccount.java @@ -58,7 +58,7 @@ public void init() { screen.locked = true; MeteorExecutor.execute(() -> { - if (account.login()) { + if (account.fetchInfo() && account.login()) { name.set(account.getUsername()); Accounts.get().save(); diff --git a/src/main/java/meteordevelopment/meteorclient/systems/accounts/Accounts.java b/src/main/java/meteordevelopment/meteorclient/systems/accounts/Accounts.java index 7a675043c3..829e4dee67 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/accounts/Accounts.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/accounts/Accounts.java @@ -73,18 +73,14 @@ public Accounts fromTag(NbtCompound tag) { AccountType type = AccountType.valueOf(t.getString("type")); try { - Account account = switch (type) { + return switch (type) { case Cracked -> new CrackedAccount(null).fromTag(t); case Microsoft -> new MicrosoftAccount(null).fromTag(t); case TheAltening -> new TheAlteningAccount(null).fromTag(t); }; - - if (account.fetchInfo()) return account; } catch (NbtException e) { return null; } - - return null; })); return this;