S9SourceNine Labs / CMAPI Docs 1.0
CMAPI / API reference

IConsoleCommandContext

Describes one invocation of a registered console command.

View source ↗
CMAPI 1.0.0Standalone runtimeWindows x64Tested with Planet Crafter 2.008
Namespace CMAPIInterfaceAssembly CMAPI.API.dll
public interface IConsoleCommandContext

Describes one invocation of a registered console command.

Members

CommandName

property
string CommandName

Gets the registered name of the command being run.

Arguments

property
IReadOnlyList<string> Arguments

Gets the arguments entered after the command name. Quoted text such as "hello world" is returned as one argument.

The outer quotes are removed. Use \" inside a quoted argument to include a literal quotation mark.

Usage

property
string Usage

Gets the command's full usage text.

WriteLine

method
void WriteLine(string message = "")

Writes a line to the CMAPI console.

WriteUsage

method
void WriteUsage()

Writes the command's usage in the standard Usage: ... format.