mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Refactor ConsoleIO and Program settings handling
- Updated ConsoleIO to allow writing to the console when Backend is null, improving error handling. - Simplified settings write-back logic in Program.cs to ensure default settings are written correctly based on configuration results.
This commit is contained in:
parent
f0fda8ce9f
commit
9cada9d19d
2 changed files with 6 additions and 9 deletions
|
|
@ -161,14 +161,7 @@ namespace MinecraftClient
|
|||
}
|
||||
|
||||
if (configResult.NeedWriteDefault)
|
||||
{
|
||||
Config.Main.Advanced.Language = Settings.GetDefaultGameLanguage();
|
||||
WriteBackSettings(false);
|
||||
}
|
||||
else if (configResult.Success)
|
||||
{
|
||||
WriteBackSettings(true);
|
||||
}
|
||||
|
||||
if (!Config.Main.Advanced.EnableSentry)
|
||||
_sentrySdk?.Dispose();
|
||||
|
|
@ -219,6 +212,8 @@ namespace MinecraftClient
|
|||
|
||||
if (cfg.NeedWriteDefault)
|
||||
{
|
||||
WriteBackSettings(false);
|
||||
|
||||
if (cfg.IsLegacyUpgrade)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§c" + Translations.mcc_use_new_config);
|
||||
|
|
@ -243,6 +238,8 @@ namespace MinecraftClient
|
|||
}
|
||||
else
|
||||
{
|
||||
WriteBackSettings(true);
|
||||
|
||||
if (!Config.Main.Advanced.Language.StartsWith("en"))
|
||||
ConsoleIO.WriteLine(string.Format(Translations.mcc_help_us_translate, Settings.TranslationProjectUrl));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue