Class CommandCollection
Routes the next argument to a registered child command, /module enable Network.
public abstract class CommandCollection : CommandDefinitionBase, ICommandCollection, ISyncCommand, ICommand
- Inheritance
-
CommandCollection
- Implements
- Derived
- Inherited Members
Constructors
CommandCollection(string, string, params string[])
Routes the next argument to a registered child command, /module enable Network.
protected CommandCollection(string name, string description, params string[] aliases)
Parameters
Properties
SubCommands
The distinct sub-commands, in insertion order.
public IEnumerable<ICommand> SubCommands { get; }
Property Value
Usage
Argument syntax shown in help/usage errors, e.g. "<player> [amount]".
public override string Usage { get; }
Property Value
Methods
AddSubCommand(ICommand)
protected void AddSubCommand(ICommand command)
Parameters
commandICommand
ExecuteBare(CommandContext)
Bare collection calls show usage; subcommand calls are routed by the dispatcher first.
protected virtual void ExecuteBare(CommandContext context)
Parameters
contextCommandContext
TryGetSubCommand(string, out ICommand?)
public bool TryGetSubCommand(string name, out ICommand? command)