mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Merge pull request #2781 from a08381/authlib-multi-user
This commit is contained in:
commit
4fb4c018e4
4 changed files with 32 additions and 2 deletions
|
|
@ -692,9 +692,24 @@ namespace MinecraftClient.Protocol
|
|||
|
||||
ConsoleIO.WriteLine(Translations.mcc_avaliable_profiles + availableProfiles);
|
||||
|
||||
ConsoleIO.WriteLine(Translations.mcc_select_profile);
|
||||
string selectedProfileName = ConsoleIO.ReadLine();
|
||||
string selectedProfileName;
|
||||
|
||||
if (Config.Main.General.AuthUser == "")
|
||||
{
|
||||
ConsoleIO.WriteLine(Translations.mcc_select_profile);
|
||||
selectedProfileName = ConsoleIO.ReadLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedProfileName = Config.Main.General.AuthUser;
|
||||
|
||||
}
|
||||
|
||||
ConsoleIO.WriteLine(Translations.mcc_selected_profile + " " + selectedProfileName);
|
||||
|
||||
// ConsoleIO.WriteLine(Translations.mcc_select_profile);
|
||||
// string selectedProfileName = ConsoleIO.ReadLine();
|
||||
// ConsoleIO.WriteLine(Translations.mcc_selected_profile + " " + selectedProfileName);
|
||||
Json.JSONData? selectedProfile = null;
|
||||
foreach (Json.JSONData profile in loginResponse.Properties["availableProfiles"]
|
||||
.DataArray)
|
||||
|
|
|
|||
|
|
@ -1748,6 +1748,15 @@ namespace MinecraftClient {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Yggdrasil authlib multi-user selection..
|
||||
/// </summary>
|
||||
internal static string Main_General_AuthlibUser {
|
||||
get {
|
||||
return ResourceManager.GetString("Main.General.AuthlibUser", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The address of the game server, "Host" can be filled in with domain name or IP address. (The "Port" field can be deleted, it will be resolved automatically).
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -855,4 +855,7 @@ If the connection to the Minecraft game server is blocked by the firewall, set E
|
|||
<data name="Main.Advanced.enable_sentry" xml:space="preserve">
|
||||
<value>Set to false to opt-out of Sentry error logging.</value>
|
||||
</data>
|
||||
<data name="Main.General.AuthlibUser" xml:space="preserve">
|
||||
<value>Yggdrasil authlib multi-user selection.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -496,6 +496,9 @@ namespace MinecraftClient
|
|||
public LoginMethod Method = LoginMethod.mcc;
|
||||
[TomlInlineComment("$Main.General.AuthlibServer$")]
|
||||
public AuthlibServer AuthServer = new(string.Empty);
|
||||
|
||||
[TomlInlineComment("$Main.General.AuthlibUser$")]
|
||||
public string AuthUser = "";
|
||||
|
||||
|
||||
public enum LoginType { mojang, microsoft,yggdrasil };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue