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
namestring
Property Value
Prefix
The chat prefix used to trigger commands in this group (e.g., "/modName").
string Prefix { get; }
Property Value
Methods
AddCommands(CmdGroupInitializer)
Registers a batch of new IChatCommands defined in the provided initializer.
void AddCommands(CmdGroupInitializer newCommands)
Parameters
newCommandsCmdGroupInitializerA 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
namestringThe name of the command (case-insensitive).
callbackAction<string[]>The action to execute when the command is invoked.
argsRequiredintThe minimum number of arguments required for the command.
Returns
- bool
True if the command was successfully added; otherwise, false.