Table of Contents

Class CommandCollection

Namespace
Shard.Modding.SDK.Command
Assembly
Shard.Modding.SDK.dll

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

name string
description string
aliases string[]

Properties

SubCommands

The distinct sub-commands, in insertion order.

public IEnumerable<ICommand> SubCommands { get; }

Property Value

IEnumerable<ICommand>

Usage

Argument syntax shown in help/usage errors, e.g. "<player> [amount]".

public override string Usage { get; }

Property Value

string

Methods

AddSubCommand(ICommand)

protected void AddSubCommand(ICommand command)

Parameters

command ICommand

ExecuteBare(CommandContext)

Bare collection calls show usage; subcommand calls are routed by the dispatcher first.

protected virtual void ExecuteBare(CommandContext context)

Parameters

context CommandContext

TryGetSubCommand(string, out ICommand?)

public bool TryGetSubCommand(string name, out ICommand? command)

Parameters

name string
command ICommand

Returns

bool