Overview
IDalamudPluginInterface acts as the primary interface for plugins to interact with Dalamud and the game. It provides access to various services, configuration management, IPC, dependency injection, and UI building capabilities.
Interface Definition
Events
Fired when the game’s localization language is changed.Delegate signature:
langCode- The new two-letter ISO language code
Fired when the active list of plugins changes (loaded, unloaded, updated).Delegate signature:
args- Event arguments containing information about the change
Properties
Plugin Information
Gets the reason this plugin was loaded.
Gets the current internal plugin name.
Gets the plugin’s manifest containing metadata.
Gets the repository from which this plugin was installed.If installed from the official/main repository, returns
SpecialPluginSource.MainRepo. Developer plugins return SpecialPluginSource.DevPlugin.Gets whether this is a development plugin.
Gets whether this is a testing release of a plugin.Dev plugins have undefined behavior for this value, but can be expected to return
false.Timing
Gets the local time that this plugin was loaded.
Gets the UTC time that this plugin was loaded.
Gets the timespan delta from when this plugin was loaded.
Directories and Files
Gets the directory where Dalamud assets are stored.
Gets the location of your plugin assembly.
Gets the directory where your plugin configurations are stored.
Gets the config file of your plugin.
UI and Development
Gets the UiBuilder instance which allows you to draw UI into the game via ImGui.
Gets whether Dalamud is running in Debug mode or the /xldev menu is open. This can occur on release builds.
Gets whether a debugger is attached.
Localization and Chat
Gets the current UI language in two-letter ISO format.
Gets the serializer class with functions to remove special characters from strings.
Gets the chat type used by default for plugin messages.
Plugin Management
Gets whether auto-updates have already completed this session.
Gets a list of installed plugins along with their current state.
Methods
UI Management
Opens the dev menu bar.Returns:
false if the DalamudInterface was null, true otherwisePlugin Information
Gets information about the version of Dalamud this plugin is loaded into.Returns: Class containing version information
Configuration Management
Saves a plugin configuration (inheriting IPluginConfiguration).
The current configuration to save
Gets a previously saved plugin configuration.Returns: A previously saved config or null if none was saved before
Gets the config directory path.Returns: Directory path:
AppData/XIVLauncher/pluginConfig/PluginInternalNameGets the localization directory path.Returns: Directory path:
AppData/XIVLauncher/pluginConfig/PluginInternalName/locData Sharing
Gets shared data with the specified tag.Returns: The shared data instance or null if not found
The unique identifier for the shared data
Removes shared data with the specified tag.
The unique identifier for the shared data to remove
IPC (Inter-Plugin Communication)
Gets an IPC provider for publishing functionality to other plugins.Type Parameters:
The name of the IPC registration
T1-T8- Parameter types for the IPC callTRet- Return type (useobjectif unused)
IpcTypeMismatchError when requested types don’t match previously registered typesGets an IPC subscriber for consuming functionality from other plugins.Type Parameters:
The name of the IPC registration
T1-T8- Parameter types for the IPC callTRet- Return type (useobjectif unused)
Dependency Injection
Creates a new object with dependency injection.Returns: The created and initialized instance, or null on failure
Additional objects to inject
Asynchronously creates a new object with dependency injection.Returns: A task representing the created and initialized instance
Additional objects to inject
Usage Example
Related Types
- IDalamudPlugin - Base plugin interface
- PluginLoadReason - Enum indicating why a plugin was loaded
- IExposedPlugin - Interface representing installed plugins