Updated docs for Yggdrasil authlib multi-user selection and cleaned the code a bit

This commit is contained in:
Anon 2026-03-22 16:48:38 +01:00
parent 7162691b57
commit 454ce331b2
2 changed files with 36 additions and 9 deletions

View file

@ -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)

View file

@ -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`