Show / Hide Table of Contents

Class CommandManager

This class manages registered in-game slash commands.

Inheritance
System.Object
CommandManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Dalamud.Game.Command
Assembly: Dalamud.dll
Syntax
public sealed class CommandManager

Constructors

| Improve this Doc View Source

CommandManager(Dalamud, ClientLanguage)

Declaration
public CommandManager(Dalamud dalamud, ClientLanguage language)
Parameters
Type Name Description
Dalamud.Dalamud dalamud
Dalamud.ClientLanguage language

Properties

| Improve this Doc View Source

Commands

Read-only list of all registered commands.

Declaration
public ReadOnlyDictionary<string, CommandInfo> Commands { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyDictionary<System.String, CommandInfo>

Methods

| Improve this Doc View Source

AddHandler(String, CommandInfo)

Add a command handler, which you can use to add your own custom commands to the in-game chat.

Declaration
public bool AddHandler(string command, CommandInfo info)
Parameters
Type Name Description
System.String command

The command to register.

CommandInfo info

A CommandInfo object describing the command.

Returns
Type Description
System.Boolean

If adding was successful.

| Improve this Doc View Source

DispatchCommand(String, String, CommandInfo)

Dispatch the handling of a command.

Declaration
public void DispatchCommand(string command, string argument, CommandInfo info)
Parameters
Type Name Description
System.String command

The command to dispatch.

System.String argument

The provided arguments.

CommandInfo info

A CommandInfo object describing this command.

| Improve this Doc View Source

ProcessCommand(String)

Process a command in full.

Declaration
public bool ProcessCommand(string content)
Parameters
Type Name Description
System.String content

The full command string.

Returns
Type Description
System.Boolean

True if the command was found and dispatched.

| Improve this Doc View Source

RemoveHandler(String)

Remove a command from the command handlers.

Declaration
public bool RemoveHandler(string command)
Parameters
Type Name Description
System.String command

The command to remove.

Returns
Type Description
System.Boolean

If the removal was successful.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX