From 454ce331b2adb1793c6df6552d6938ae245a26b2 Mon Sep 17 00:00:00 2001 From: Anon Date: Sun, 22 Mar 2026 16:48:38 +0100 Subject: [PATCH] Updated docs for Yggdrasil authlib multi-user selection and cleaned the code a bit --- MinecraftClient/Protocol/ProtocolHandler.cs | 11 ++----- docs/guide/configuration.md | 34 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/MinecraftClient/Protocol/ProtocolHandler.cs b/MinecraftClient/Protocol/ProtocolHandler.cs index 5781eb5f..c2fc7cef 100644 --- a/MinecraftClient/Protocol/ProtocolHandler.cs +++ b/MinecraftClient/Protocol/ProtocolHandler.cs @@ -694,22 +694,15 @@ namespace MinecraftClient.Protocol string selectedProfileName; - if (Config.Main.General.AuthUser == "") + if (String.IsNullOrEmpty(Config.Main.General.AuthUser) || String.IsNullOrWhiteSpace(Config.Main.General.AuthUser)) { ConsoleIO.WriteLine(Translations.mcc_select_profile); selectedProfileName = ConsoleIO.ReadLine(); } - else - { - selectedProfileName = Config.Main.General.AuthUser; - - } + 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) diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index 935c74bd..faa1e088 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -140,6 +140,40 @@ Coordinate = { x = 145, y = 64, z = 2045 } Method = "mcc" ``` +#### `AuthServer` + +- **Description:** + + This setting is used when `AccountType` is set to `yggdrasil`. It points MCC at the authlib/Yggdrasil server used for login and session checks. + + You can provide either just the host name or a `host:port` pair. If the port is omitted, MCC uses `443`. + +- **Type:** `inline table` + +- **Default:** `{ Host = "", Port = 443 }` + +- **Example:** + + ``` + AuthServer = { Host = "auth.example.com", Port = 443 } + ``` + +#### `AuthUser` + +- **Description:** + + This setting allows for Yggdrasil authlib multi-user selection. It selects which profile MCC should use when the authlib/Yggdrasil server returns multiple available profiles. Leave it empty to pick the profile interactively. + +- **Type:** `string` + +- **Default:** `""` + +- **Example:** + + ``` + AuthUser = "SomePlayer" + ``` + ### Main Advanced section - **Section header:** `Main.Advanced`