Interface IConsole
Provides functions to register console commands and variables.
Assembly: Dalamud.dll
[Experimental("Dalamud001")]
public interface IConsole : IDalamudService
Properties
Prefix
Gets this plugin's namespace prefix, derived off its internal name. This is the prefix that all commands and variables registered by this plugin will have. If the internal name is "SamplePlugin", the prefix will be "sampleplugin.".
string Prefix { get; }
Methods
AddCommand(string, string, Func<bool>)
Add a command to the console.
IConsoleCommand AddCommand(string name, string description, Func<bool> func)
Returns
Dalamud.Console.IConsoleCommand: The added command.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the command. |
System.String | description | A description of the command. |
System.Func<System.Boolean> | func | Function to invoke when the command has been called. Must return a System.Boolean indicating success. |
AddCommand<T1>(string, string, Func<bool, T1>)
Add a command to the console.
IConsoleCommand AddCommand<T1>(string name, string description, Func<bool, T1> func)
Returns
Dalamud.Console.IConsoleCommand: The added command.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the command. |
System.String | description | A description of the command. |
System.Func<System.Boolean,<T1>> | func | Function to invoke when the command has been called. Must return a System.Boolean indicating success. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first argument to the command. |
AddCommand<T1, T2>(string, string, Func<bool, T1, T2>)
Add a command to the console.
IConsoleCommand AddCommand<T1, T2>(string name, string description, Func<bool, T1, T2> func)
Returns
Dalamud.Console.IConsoleCommand: The added command.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the command. |
System.String | description | A description of the command. |
System.Func<System.Boolean,<T1>,<T2>> | func | Function to invoke when the command has been called. Must return a System.Boolean indicating success. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first argument to the command. |
T2 | The second argument to the command. |
AddCommand<T1, T2, T3>(string, string, Func<bool, T1, T2, T3>)
Add a command to the console.
IConsoleCommand AddCommand<T1, T2, T3>(string name, string description, Func<bool, T1, T2, T3> func)
Returns
Dalamud.Console.IConsoleCommand: The added command.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the command. |
System.String | description | A description of the command. |
System.Func<System.Boolean,<T1>,<T2>,<T3>> | func | Function to invoke when the command has been called. Must return a System.Boolean indicating success. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first argument to the command. |
T2 | The second argument to the command. |
T3 | The third argument to the command. |
AddCommand<T1, T2, T3, T4>(string, string, Func<bool, T1, T2, T3, T4>)
Add a command to the console.
IConsoleCommand AddCommand<T1, T2, T3, T4>(string name, string description, Func<bool, T1, T2, T3, T4> func)
Returns
Dalamud.Console.IConsoleCommand: The added command.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the command. |
System.String | description | A description of the command. |
System.Func<System.Boolean,<T1>,<T2>,<T3>,<T4>> | func | Function to invoke when the command has been called. Must return a System.Boolean indicating success. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first argument to the command. |
T2 | The second argument to the command. |
T3 | The third argument to the command. |
T4 | The fourth argument to the command. |
AddCommand<T1, T2, T3, T4, T5>(string, string, Func<bool, T1, T2, T3, T4, T5>)
Add a command to the console.
IConsoleCommand AddCommand<T1, T2, T3, T4, T5>(string name, string description, Func<bool, T1, T2, T3, T4, T5> func)
Returns
Dalamud.Console.IConsoleCommand: The added command.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the command. |
System.String | description | A description of the command. |
System.Func<System.Boolean,<T1>,<T2>,<T3>,<T4>,<T5>> | func | Function to invoke when the command has been called. Must return a System.Boolean indicating success. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first argument to the command. |
T2 | The second argument to the command. |
T3 | The third argument to the command. |
T4 | The fourth argument to the command. |
T5 | The fifth argument to the command. |
AddVariable<T>(string, string, T)
Add a variable to the console.
IConsoleVariable<T> AddVariable<T>(string name, string description, T defaultValue)
Returns
Dalamud.Console.IConsoleVariable<T>: The added variable.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the variable. |
System.String | description | A description of the variable. |
<T> | defaultValue | The default value of the variable. |
Type Parameters
| Name | Description |
|---|---|
T | The type of the variable. |
AddAlias(string, string)
Add an alias to a console entry.
IConsoleEntry AddAlias(string name, string alias)
Returns
Dalamud.Console.IConsoleEntry: The added alias.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the entry to add an alias for. |
System.String | alias | The alias to use. |
GetVariable<T>(string)
Get the value of a variable.
T GetVariable<T>(string name)
Returns
<T>: The value of the variable.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the variable. |
Type Parameters
| Name | Description |
|---|---|
T | The type of the variable. |
SetVariable<T>(string, T)
Set the value of a variable.
void SetVariable<T>(string name, T value)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | The name of the variable. |
<T> | value | The value to set. |
Type Parameters
| Name | Description |
|---|---|
T | The type of the value to set. |
RemoveEntry(IConsoleEntry)
Remove an entry from the console.
void RemoveEntry(IConsoleEntry entry)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Console.IConsoleEntry | entry | The entry to remove. |