Strip Minecraft Color Codes (§) in BasicIO-NoColor mode (#995)

Strip Minecraft color codes and formatting (§) if in BasicIO mode by using BasicIO-NoColor.
This commit is contained in:
5tanly 2020-05-14 13:36:56 -04:00 committed by GitHub
parent 43c2b4b73b
commit a018304f99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 2 deletions

View file

@ -55,6 +55,11 @@ namespace MinecraftClient
/// </summary>
public static bool BasicIO = false;
/// <summary>
/// Determines whether not to print color codes in BasicIO mode.
/// </summary>
public static bool BasicIO_NoColor = false;
/// <summary>
/// Determine whether WriteLineFormatted() should prepend lines with timestamps by default.
/// </summary>
@ -336,6 +341,10 @@ namespace MinecraftClient
}
if (BasicIO)
{
if (BasicIO_NoColor)
{
str = ChatBot.GetVerbatim(str);
}
Console.WriteLine(str);
return;
}