mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
AddYggdrasilLogin
This commit is contained in:
parent
eb8ccc43d7
commit
3c97193b70
6 changed files with 156 additions and 25 deletions
|
|
@ -494,8 +494,11 @@ namespace MinecraftClient
|
|||
|
||||
[TomlInlineComment("$Main.General.method$")]
|
||||
public LoginMethod Method = LoginMethod.mcc;
|
||||
[TomlInlineComment("$Main.General.AuthlibServer$")]
|
||||
public AuthlibServer AuthServer = new(string.Empty);
|
||||
|
||||
|
||||
public enum LoginType { mojang, microsoft };
|
||||
public enum LoginType { mojang, microsoft,Yggdrasil };
|
||||
|
||||
public enum LoginMethod { mcc, browser };
|
||||
}
|
||||
|
|
@ -688,6 +691,29 @@ namespace MinecraftClient
|
|||
this.Port = Port;
|
||||
}
|
||||
}
|
||||
public struct AuthlibServer
|
||||
{
|
||||
public string Host = string.Empty;
|
||||
public int Port = 443;
|
||||
|
||||
public AuthlibServer(string Host)
|
||||
{
|
||||
string[] sip = Host.Split(new[] { ":", ":" }, StringSplitOptions.None);
|
||||
this.Host = sip[0];
|
||||
|
||||
if (sip.Length > 1)
|
||||
{
|
||||
try { this.Port = Convert.ToUInt16(sip[1]); }
|
||||
catch (FormatException) { }
|
||||
}
|
||||
}
|
||||
|
||||
public AuthlibServer(string Host, ushort Port)
|
||||
{
|
||||
this.Host = Host.Split(new[] { ":", ":" }, StringSplitOptions.None)[0];
|
||||
this.Port = Port;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue