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
|
|
@ -104,7 +104,7 @@ namespace MinecraftClient
|
|||
/// </summary>
|
||||
public static void WriteLine(string line)
|
||||
{
|
||||
if (BasicIO)
|
||||
if (BasicIO || Backend is null)
|
||||
Console.WriteLine(line);
|
||||
else
|
||||
Backend.WriteLine(line);
|
||||
|
|
@ -137,7 +137,7 @@ namespace MinecraftClient
|
|||
{
|
||||
str = str.Replace('\n', ' ');
|
||||
}
|
||||
if (BasicIO)
|
||||
if (BasicIO || Backend is null)
|
||||
{
|
||||
if (BasicIO_NoColor)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue