Show / Hide Table of Contents

# Class DalamudPluginInterface

This class acts as an interface to various objects needed to interact with Dalamud and the game.

##### Inheritance

System.Object
DalamudPluginInterface

##### Implements

System.IDisposable

##### 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.Plugin

###### Assembly: Dalamud.dll

##### Syntax

    public class DalamudPluginInterface : IDisposable

### Fields

| Improve this Doc View Source

#### ClientState

The ClientState object that allows you to access current client memory information like actors, territories, etc.

##### Declaration

    public readonly ClientState ClientState

##### Field Value

Type | Description
--- | ---
ClientState |

| Improve this Doc View Source

#### CommandManager

The CommandManager object that allows you to add and remove custom chat commands.

##### Declaration

    public readonly CommandManager CommandManager

##### Field Value

Type | Description
--- | ---
CommandManager |

| Improve this Doc View Source

#### Data

A DataManager instance which allows you to access game data needed by the main dalamud features.

##### Declaration

    public readonly DataManager Data

##### Field Value

Type | Description
--- | ---
DataManager |

| Improve this Doc View Source

#### Framework

The Framework object that allows you to interact with the client.

##### Declaration

    public readonly Framework Framework

##### Field Value

Type | Description
--- | ---
Framework |

| Improve this Doc View Source

#### SeStringManager

A SeStringManager instance which allows creating and parsing SeString payloads.

##### Declaration

    public readonly SeStringManager SeStringManager

##### Field Value

Type | Description
--- | ---
SeStringManager |

| Improve this Doc View Source

#### TargetModuleScanner

A SigScanner instance targeting the main module of the FFXIV process.

##### Declaration

    public readonly SigScanner TargetModuleScanner

##### Field Value

Type | Description
--- | ---
SigScanner |

| Improve this Doc View Source

#### UiBuilder

A UiBuilder instance which allows you to draw UI into the game via ImGui draw calls.

##### Declaration

    public readonly UiBuilder UiBuilder

##### Field Value

Type | Description
--- | ---
UiBuilder |

### Properties

| Improve this Doc View Source

#### Reason

The reason this plugin was loaded.

##### Declaration

    public PluginLoadReason Reason { get; }

##### Property Value

Type | Description
--- | ---
PluginLoadReason |

### Methods

| Improve this Doc View Source

#### Dispose()

Unregister your plugin and dispose all references. You have to call this when your IDalamudPlugin is disposed.

##### Declaration

    public void Dispose()

| Improve this Doc View Source

#### GetPluginConfig()

Get a previously saved plugin configuration or null if none was saved before.

##### Declaration

    public IPluginConfiguration GetPluginConfig()

##### Returns

Type | Description
--- | ---
IPluginConfiguration | A previously saved config or null if none was saved before.

| Improve this Doc View Source

#### Log(String, Object[])

Log a templated message to the in-game debug log.

##### Declaration

    [Obsolete]
    public void Log(string messageTemplate, params object[] values)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | messageTemplate | The message template.
System.Object[] | values | Values to log.

| Improve this Doc View Source

#### LogError(Exception, String, Object[])

Log a templated error message to the in-game debug log.

##### Declaration

    [Obsolete]
    public void LogError(Exception exception, string messageTemplate, params object[] values)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Exception | exception | The exception that caused the error.
System.String | messageTemplate | The message template.
System.Object[] | values | Values to log.

| Improve this Doc View Source

#### LogError(String, Object[])

Log a templated error message to the in-game debug log.

##### Declaration

    [Obsolete]
    public void LogError(string messageTemplate, params object[] values)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | messageTemplate | The message template.
System.Object[] | values | Values to log.

| Improve this Doc View Source

#### SavePluginConfig(IPluginConfiguration)

Save a plugin configuration(inheriting IPluginConfiguration).

##### Declaration

    public void SavePluginConfig(IPluginConfiguration currentConfig)

##### Parameters

Type | Name | Description
--- | --- | ---
IPluginConfiguration | currentConfig | The current configuration.

| Improve this Doc View Source

#### SendMessage(ExpandoObject)

Send a message to all subscribed plugins.

##### Declaration

    public void SendMessage(ExpandoObject message)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Dynamic.ExpandoObject | message | The message to send.

| Improve this Doc View Source

#### SendMessage(String, ExpandoObject)

Send a message to a specific plugin.

##### Declaration

    public bool SendMessage(string pluginName, ExpandoObject message)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | pluginName | The InternalName of the plugin to send the message to.
System.Dynamic.ExpandoObject | message | The message to send.

##### Returns

Type | Description
--- | ---
System.Boolean | True if the corresponding plugin was present and received the message.

| Improve this Doc View Source

#### Subscribe(String, Action<ExpandoObject>)

Subscribe to an IPC message by a plugin.

##### Declaration

    public void Subscribe(string pluginName, Action<ExpandoObject> action)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | pluginName | The InternalName of the plugin to subscribe to.
System.Action<System.Dynamic.ExpandoObject> | action | The action to take when a message was received.

| Improve this Doc View Source

#### SubscribeAny(Action<String, ExpandoObject>)

Subscribe to an IPC message by any plugin.

##### Declaration

    public void SubscribeAny(Action<string, ExpandoObject> action)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Action<System.String, System.Dynamic.ExpandoObject> | action | The action to take when a message was received.

| Improve this Doc View Source

#### Unsubscribe(String)

Unsubscribe from messages from a plugin.

##### Declaration

    public void Unsubscribe(string pluginName)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | pluginName | The InternalName of the plugin to unsubscribe from.

| Improve this Doc View Source

#### UnsubscribeAny()

Unsubscribe from messages from any plugin.

##### Declaration

    public void UnsubscribeAny()

### Implements

System.IDisposable