Class ConsoleManagerPluginScoped
Plugin-scoped version of the console service.
Assembly: Dalamud.dll
View Source
public class ConsoleManagerPluginScoped : IConsole, IServiceType
Implements:
Dalamud.Plugin.Services.IConsole, Dalamud.IServiceType
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.".
View Source
public string Prefix { get; }
Methods
AddCommand(string, string, Func<bool>)
Add a command to the console.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public 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.
View Source
public void RemoveEntry(IConsoleEntry entry)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Console.IConsoleEntry | entry | The entry to remove. |