Skip to main content

Class ConsoleManagerPluginScoped

Plugin-scoped version of the console service.

Assembly: Dalamud.dll
View Source
Declaration
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
Declaration
public string Prefix { get; }

Methods

AddCommand(string, string, Func<bool>)

Add a command to the console.

View Source
Declaration
public IConsoleCommand AddCommand(string name, string description, Func<bool> func)
Returns

Dalamud.Console.IConsoleCommand: The added command.

Parameters
TypeNameDescription
System.StringnameThe name of the command.
System.StringdescriptionA description of the command.
System.Func<System.Boolean>funcFunction 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
Declaration
public IConsoleCommand AddCommand<T1>(string name, string description, Func<bool, T1> func)
Returns

Dalamud.Console.IConsoleCommand: The added command.

Parameters
TypeNameDescription
System.StringnameThe name of the command.
System.StringdescriptionA description of the command.
System.Func<System.Boolean,<T1>>funcFunction to invoke when the command has been called. Must return a System.Boolean indicating success.
Type Parameters
NameDescription
T1The first argument to the command.

AddCommand<T1, T2>(string, string, Func<bool, T1, T2>)

Add a command to the console.

View Source
Declaration
public IConsoleCommand AddCommand<T1, T2>(string name, string description, Func<bool, T1, T2> func)
Returns

Dalamud.Console.IConsoleCommand: The added command.

Parameters
TypeNameDescription
System.StringnameThe name of the command.
System.StringdescriptionA description of the command.
System.Func<System.Boolean,<T1>,<T2>>funcFunction to invoke when the command has been called. Must return a System.Boolean indicating success.
Type Parameters
NameDescription
T1The first argument to the command.
T2The second argument to the command.

AddCommand<T1, T2, T3>(string, string, Func<bool, T1, T2, T3>)

Add a command to the console.

View Source
Declaration
public IConsoleCommand AddCommand<T1, T2, T3>(string name, string description, Func<bool, T1, T2, T3> func)
Returns

Dalamud.Console.IConsoleCommand: The added command.

Parameters
TypeNameDescription
System.StringnameThe name of the command.
System.StringdescriptionA description of the command.
System.Func<System.Boolean,<T1>,<T2>,<T3>>funcFunction to invoke when the command has been called. Must return a System.Boolean indicating success.
Type Parameters
NameDescription
T1The first argument to the command.
T2The second argument to the command.
T3The 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
Declaration
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
TypeNameDescription
System.StringnameThe name of the command.
System.StringdescriptionA description of the command.
System.Func<System.Boolean,<T1>,<T2>,<T3>,<T4>>funcFunction to invoke when the command has been called. Must return a System.Boolean indicating success.
Type Parameters
NameDescription
T1The first argument to the command.
T2The second argument to the command.
T3The third argument to the command.
T4The 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
Declaration
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
TypeNameDescription
System.StringnameThe name of the command.
System.StringdescriptionA description of the command.
System.Func<System.Boolean,<T1>,<T2>,<T3>,<T4>,<T5>>funcFunction to invoke when the command has been called. Must return a System.Boolean indicating success.
Type Parameters
NameDescription
T1The first argument to the command.
T2The second argument to the command.
T3The third argument to the command.
T4The fourth argument to the command.
T5The fifth argument to the command.

AddVariable<T>(string, string, T)

Add a variable to the console.

View Source
Declaration
public IConsoleVariable<T> AddVariable<T>(string name, string description, T defaultValue)
Returns

Dalamud.Console.IConsoleVariable<T>: The added variable.

Parameters
TypeNameDescription
System.StringnameThe name of the variable.
System.StringdescriptionA description of the variable.
<T>defaultValueThe default value of the variable.
Type Parameters
NameDescription
TThe type of the variable.

AddAlias(string, string)

Add an alias to a console entry.

View Source
Declaration
public IConsoleEntry AddAlias(string name, string alias)
Returns

Dalamud.Console.IConsoleEntry: The added alias.

Parameters
TypeNameDescription
System.StringnameThe name of the entry to add an alias for.
System.StringaliasThe alias to use.

GetVariable<T>(string)

Get the value of a variable.

View Source
Declaration
public T GetVariable<T>(string name)
Returns

<T>: The value of the variable.

Parameters
TypeNameDescription
System.StringnameThe name of the variable.
Type Parameters
NameDescription
TThe type of the variable.

SetVariable<T>(string, T)

Set the value of a variable.

View Source
Declaration
public void SetVariable<T>(string name, T value)
Parameters
TypeNameDescription
System.StringnameThe name of the variable.
<T>valueThe value to set.
Type Parameters
NameDescription
TThe type of the value to set.

RemoveEntry(IConsoleEntry)

Remove an entry from the console.

View Source
Declaration
public void RemoveEntry(IConsoleEntry entry)
Parameters
TypeNameDescription
Dalamud.Console.IConsoleEntryentryThe entry to remove.

Implements