Table of Contents

Interface ICommandGroup

Namespace
RichHudFramework.UI
Assembly
RichHudClient.dll

Represents a collection of IChatCommands that share a common prefix (e.g., "/modname").

public interface ICommandGroup : IIndexedCollection<IChatCommand>
Inherited Members

Properties

this[string]

Retrieves the command with the specified name from the group.

IChatCommand this[string name] { get; }

Parameters

name string

Property Value

IChatCommand

Prefix

The chat prefix used to trigger commands in this group (e.g., "/modName").

string Prefix { get; }

Property Value

string

Methods

AddCommands(CmdGroupInitializer)

Registers a batch of new IChatCommands defined in the provided initializer.

void AddCommands(CmdGroupInitializer newCommands)

Parameters

newCommands CmdGroupInitializer

A collection of command definitions to add.

TryAdd(string, Action<string[]>, int)

Attempts to register a new IChatCommand to this group. Command names must be unique within the group.

bool TryAdd(string name, Action<string[]> callback = null, int argsRequired = 0)

Parameters

name string

The name of the command (case-insensitive).

callback Action<string[]>

The action to execute when the command is invoked.

argsRequired int

The minimum number of arguments required for the command.

Returns

bool

True if the command was successfully added; otherwise, false.