2017-03-15 19:14:58 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
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]"; } }
|
|
|
|
|
|
public override string CmdDesc { get { return "cmd.debug.desc"; } }
|
2017-03-15 19:14:58 +01:00
|
|
|
|
|
2020-06-20 15:01:16 +02:00
|
|
|
|
public override string Run(McClient handler, string command, Dictionary<string, object> localVars)
|
2017-03-15 19:14:58 +01:00
|
|
|
|
{
|
|
|
|
|
|
if (hasArg(command))
|
|
|
|
|
|
{
|
|
|
|
|
|
Settings.DebugMessages = (getArg(command).ToLower() == "on");
|
|
|
|
|
|
}
|
|
|
|
|
|
else Settings.DebugMessages = !Settings.DebugMessages;
|
2020-10-17 19:41:31 +08:00
|
|
|
|
return Translations.Get(Settings.DebugMessages ? "cmd.debug.state_on" : "cmd.debug.state_off");
|
2017-03-15 19:14:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|