From dda2ce293cb1edd252550993627700e47932a26e Mon Sep 17 00:00:00 2001 From: ORelio Date: Tue, 14 Mar 2017 22:04:35 +0100 Subject: [PATCH] Add LogDebugToConsole() ChatBot API method Allows printing debug messages. Debug messages are shown only if the "debugmessages" setting is enabled. See #223 --- MinecraftClient/ChatBot.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index 939e5c39..deca76d6 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -511,6 +511,16 @@ namespace MinecraftClient } } + /// + /// Write some text in the console, but only if DebugMessages is enabled in INI file. Nothing will be sent to the server. + /// + /// Debug log text to write + protected void LogDebugToConsole(object text) + { + if (Settings.DebugMessages) + LogToConsole(text); + } + /// /// Disconnect from the server and restart the program /// It will unload and reload all the bots and then reconnect to the server