Merge pull request #63 from Silent-Client/TEST2

Test2
This commit is contained in:
kirillsaint 2023-10-22 13:46:42 +06:00 committed by GitHub
commit a6b5938253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -59,7 +59,9 @@ public class GeneralMod extends Mod {
break;
case "Menu Animations":
case "Menu Animations Speed":
if(ClickGUI.introAnimation != null) {
ClickGUI.introAnimation.setDuration(Client.getInstance().getSettingsManager().getSettingByName(this, "Menu Animations").getValBoolean() ? Client.getInstance().getSettingsManager().getSettingByName(this, "Menu Animations Speed").getValInt() : 1);
}
break;
}
}

View File

@ -51,11 +51,13 @@ public class AccountManager {
Requests.httpPost(Client.getInstance().getApiUrl() + "/set_selected", new JSONObject().put("selected", index).toString());
}
selected = account;
if(!force) {
Session session = new Session(account.username, nameToUuid(account.username), account.mc_access_token != null ? account.mc_access_token : "0", account.mc_access_token != null ? "msa" : "legacy");
((MinecraftExt) Minecraft.getMinecraft()).setSession(session);
Client.getInstance().getUserData().setAccessToken(selected.access_token);
Client.getInstance().getSilentSocket().Disconnect();
Client.getInstance().getSilentSocket().Connect(selected.access_token);
}
PlayerResponse acc = Client.getInstance().updateAccount();
if(acc != null) {
Client.getInstance().setAccount(acc.getAccount());