2022-10-02 18:31:08 +08:00
|
|
|
|
using System.Collections.Generic;
|
2017-03-15 19:14:58 +01:00
|
|
|
|
|
|
|
|
|
|
namespace MinecraftClient.Commands
|
|
|
|
|
|
{
|
|
|
|
|
|
public class Debug : Command
|
|
|
|
|
|
{
|
2020-10-17 19:41:31 +08:00
|
|
|
|
public override string CmdName { get { return "debug"; } }
|
|
|
|
|
|
public override string CmdUsage { get { return "debug [on|off]"; } }
|
2022-10-28 11:13:20 +08:00
|
|
|
|
public override string CmdDesc { get { return Translations.cmd_debug_desc; } }
|
2017-03-15 19:14:58 +01:00
|
|
|
|
|
2022-10-02 18:31:08 +08:00
|
|
|
|
public override string Run(McClient handler, string command, Dictionary<string, object>? localVars)
|
2017-03-15 19:14:58 +01:00
|
|
|
|
{
|
2022-10-02 18:31:08 +08:00
|
|
|
|
if (HasArg(command))
|
2022-10-05 15:02:30 +08:00
|
|
|
|
Settings.Config.Logging.DebugMessages = (GetArg(command).ToLower() == "on");
|
|
|
|
|
|
else
|
|
|
|
|
|
Settings.Config.Logging.DebugMessages = !Settings.Config.Logging.DebugMessages;
|
2022-10-28 11:13:20 +08:00
|
|
|
|
if (Settings.Config.Logging.DebugMessages)
|
|
|
|
|
|
return Translations.cmd_debug_state_on;
|
|
|
|
|
|
else
|
|
|
|
|
|
return Translations.cmd_debug_state_off;
|
2017-03-15 19:14:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|