Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions MinecraftClient/MinecraftCom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,23 +287,42 @@ private static void printstring(string str, bool acceptnewlines)
if (!String.IsNullOrEmpty(str))
{
if (!acceptnewlines) { str = str.Replace('\n', ' '); }
if (ConsoleIO.basicIO) { ConsoleIO.WriteLine(str); return; }
string[] subs = str.Split(new char[] { '§' });
if (subs[0].Length > 0) { ConsoleIO.Write(subs[0]); }
for (int i = 1; i < subs.Length; i++)
if (ConsoleIO.basicIO)
{
if (subs[i].Length > 0)
string line = "";
string[] subs = str.Split(new char[] {'§'});
if (subs[0].Length > 0) { line += subs[0]; }
for (int i = 1; i < subs.Length; i++)
{
setcolor(subs[i][0]);
if (subs[i].Length > 1)
{
ConsoleIO.Write(subs[i].Substring(1, subs[i].Length - 1));
line += (subs[i].Substring(1, subs[i].Length - 1));
}

}

ConsoleIO.WriteLine(line); return;
}
else
{
string[] subs = str.Split(new char[] {'§'});
if (subs[0].Length > 0) { ConsoleIO.Write(subs[0]); }
for (int i = 1; i < subs.Length; i++)
{
if (subs[i].Length > 0)
{
setcolor(subs[i][0]);
if (subs[i].Length > 1)
{
ConsoleIO.Write(subs[i].Substring(1, subs[i].Length - 1));
}
}
}
ConsoleIO.Write('\n');
}
ConsoleIO.Write('\n');
Console.ForegroundColor = ConsoleColor.Gray;
}
Console.ForegroundColor = ConsoleColor.Gray;

}

private bool autocomplete_received = false;
Expand Down