Improve logging, auto respawn

See discussion in GitHub issue #918
This commit is contained in:
ORelio 2020-04-01 21:15:35 +02:00
parent e93f03bd4e
commit b01c50b792
7 changed files with 217 additions and 26 deletions

View file

@ -384,8 +384,11 @@ namespace MinecraftClient
/// Write a prefixed log line. Prefix is set in LogPrefix.
/// </summary>
/// <param name="text">Text of the log line</param>
public static void WriteLogLine(string text)
/// <param name="acceptnewlines">Allow line breaks</param>
public static void WriteLogLine(string text, bool acceptnewlines = true)
{
if (!acceptnewlines)
text = text.Replace('\n', ' ');
WriteLineFormatted(LogPrefix + text);
}