Skip to main content
Version: 12.x (API 12) [Current]

Class PluginConfigurations

Configuration to store settings for a dalamud plugin.

Assembly: Dalamud.dll​
View Source​
Declaration
public sealed class PluginConfigurations

Methods​

Save(IPluginConfiguration, string, Guid)​

Save/Load plugin configuration. NOTE: Save/Load are still using Type information for now, despite LoadForType superseding Load and not requiring or using it. It might be worth removing the Type info from Save, to strip it from all future saved configs, and then Load() can probably be removed entirely.

View Source​
Declaration
public void Save(IPluginConfiguration config, string pluginName, Guid workingPluginId)
Parameters​
TypeNameDescription
Dalamud.Configuration.IPluginConfigurationconfigPlugin configuration.
System.StringpluginNamePlugin name.
System.GuidworkingPluginIdWorkingPluginId of the plugin.

Load(string, Guid)​

Load plugin configuration.

View Source​
Declaration
public IPluginConfiguration? Load(string pluginName, Guid workingPluginId)
Returns​

Dalamud.Configuration.IPluginConfiguration: Plugin configuration.

Parameters​
TypeNameDescription
System.StringpluginNamePlugin name.
System.GuidworkingPluginIdWorkingPluginID of the plugin.

Delete(string)​

Delete the configuration file and folder for the specified plugin. This will throw an System.IO.IOException if the plugin did not correctly close its handles.

View Source​
Declaration
public void Delete(string pluginName)
Parameters​
TypeNameDescription
System.StringpluginNameThe name of the plugin.

GetDirectory(string)​

Get plugin directory.

View Source​
Declaration
public string GetDirectory(string pluginName)
Returns​

System.String: Plugin directory path.

Parameters​
TypeNameDescription
System.StringpluginNamePlugin name.

LoadForType<T>(string)​

Load Plugin configuration. Parameterized deserialization. Currently this is called via reflection from DalamudPluginInterface.GetPluginConfig(). Eventually there may be an additional pluginInterface method that can call this directly without reflection - for now this is in support of the existing plugin api.

View Source​
Declaration
public T LoadForType<T>(string pluginName) where T : IPluginConfiguration
Returns​

<T>: Plugin Configuration.

Parameters​
TypeNameDescription
System.StringpluginNamePlugin Name.
Type Parameters​
NameDescription
TConfiguration Type.

GetConfigFile(string)​

Get FileInfo to plugin config file.

View Source​
Declaration
public FileInfo GetConfigFile(string pluginName)
Returns​

System.IO.FileInfo: FileInfo of the config file.

Parameters​
TypeNameDescription
System.StringpluginNameInternalName of the plugin.