Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions MinecraftClient/Protocol/ProtocolHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -637,9 +637,24 @@ private static LoginResult YggdrasiLogin(string user, string pass, out SessionTo

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)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions MinecraftClient/Resources/ConfigComments/ConfigComments.resx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
3 changes: 3 additions & 0 deletions MinecraftClient/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ public class GeneralConfig
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 };
Expand Down