AddYggdrasilLogin

This commit is contained in:
Polaris_Light 2023-11-12 21:04:20 +08:00
parent eb8ccc43d7
commit 3c97193b70
6 changed files with 156 additions and 25 deletions

View file

@ -416,7 +416,7 @@ namespace MinecraftClient
else
{
// Validate cached session or login new session.
if (Config.Main.Advanced.SessionCache != CacheType.none && SessionCache.Contains(loginLower))
if (Config.Main.Advanced.SessionCache != CacheType.none && SessionCache.Contains(loginLower) && Config.Main.General.AccountType != LoginType.Yggdrasil)
{
session = SessionCache.Get(loginLower);
result = ProtocolHandler.GetTokenValidation(session);
@ -455,7 +455,7 @@ namespace MinecraftClient
SessionCache.Store(loginLower, session);
if (result == ProtocolHandler.LoginResult.Success)
session.SessionPreCheckTask = Task.Factory.StartNew(() => session.SessionPreCheck());
session.SessionPreCheckTask = Task.Factory.StartNew(() => session.SessionPreCheck(Config.Main.General.AccountType));
}
if (result == ProtocolHandler.LoginResult.Success)