Added /execmulti and /execif commands.

Added a way to execute multiple commands with a single command and a conditional command.
The documentation will be updated soon.
This commit is contained in:
Anon 2022-09-19 15:26:53 +00:00 committed by GitHub
commit b5cf315ca1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 169 additions and 1 deletions

View file

@ -571,7 +571,7 @@ namespace MinecraftClient
{
string response_msg = "";
string command = Settings.internalCmdChar == ' ' ? text : text.Substring(1);
if (!PerformInternalCommand(Settings.ExpandVars(command), ref response_msg) && Settings.internalCmdChar == '/')
if (!PerformInternalCommand(Settings.ExpandVars(command), ref response_msg, Settings.GetVariables()) && Settings.internalCmdChar == '/')
{
SendText(text);
}
@ -659,6 +659,7 @@ namespace MinecraftClient
else if (cmds.ContainsKey(command_name))
{
response_msg = cmds[command_name].Run(this, command, localVars);
foreach (ChatBot bot in bots.ToArray())
{
try