Show server ping json in debug messages (#1184)

This commit is contained in:
ORelio 2020-08-08 14:13:59 +02:00
parent 1485612f29
commit 24b3dac2a3
2 changed files with 20 additions and 1 deletions

View file

@ -1216,6 +1216,14 @@ namespace MinecraftClient.Protocol.Handlers
{
string result = dataTypes.ReadNextString(packetData); //Get the Json data
if (Settings.DebugMessages)
{
// May contain formatting codes, cannot use WriteLineFormatted
Console.ForegroundColor = ConsoleColor.DarkGray;
ConsoleIO.WriteLine(result);
Console.ForegroundColor = ConsoleColor.Gray;
}
if (!String.IsNullOrEmpty(result) && result.StartsWith("{") && result.EndsWith("}"))
{
Json.JSONData jsonData = Json.ParseJson(result);