Fixes default commands not working like .modify speed 5
This commit is contained in:
@@ -382,10 +382,21 @@ namespace Game.Chat
|
|||||||
bool IsVisible(CommandHandler who) { return IsInvokerVisible(who) || HasVisibleSubCommands(who); }
|
bool IsVisible(CommandHandler who) { return IsInvokerVisible(who) || HasVisibleSubCommands(who); }
|
||||||
|
|
||||||
public void AddSubCommand(ChatCommandNode command)
|
public void AddSubCommand(ChatCommandNode command)
|
||||||
|
{
|
||||||
|
if (command._name.IsEmpty())
|
||||||
|
{
|
||||||
|
_permission = command._permission;
|
||||||
|
_helpText = command._helpText;
|
||||||
|
_helpString = command._helpString;
|
||||||
|
_methodInfo = command._methodInfo;
|
||||||
|
parameterTypes = command.parameterTypes;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (!_subCommands.TryAdd(command._name, command))
|
if (!_subCommands.TryAdd(command._name, command))
|
||||||
Log.outError(LogFilter.Commands, $"Error trying to add subcommand, Already exists Command: {_name} SubCommand: {command._name}");
|
Log.outError(LogFilter.Commands, $"Error trying to add subcommand, Already exists Command: {_name} SubCommand: {command._name}");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool Invoke(CommandHandler handler, StringArguments args)
|
public bool Invoke(CommandHandler handler, StringArguments args)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user