Class PluginConfigurations
Configuration to store settings for a dalamud plugin.
Assembly: Dalamud.dll
View Source
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
public void Save(IPluginConfiguration config, string pluginName, Guid workingPluginId)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Configuration.IPluginConfiguration | config | Plugin configuration. |
System.String | pluginName | Plugin name. |
System.Guid | workingPluginId | WorkingPluginId of the plugin. |
Load(string, Guid)
Load plugin configuration.
View Source
public IPluginConfiguration? Load(string pluginName, Guid workingPluginId)
Returns
Dalamud.Configuration.IPluginConfiguration: Plugin configuration.
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginName | Plugin name. |
System.Guid | workingPluginId | WorkingPluginID 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
public void Delete(string pluginName)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginName | The name of the plugin. |
GetDirectory(string)
Get plugin directory.
View Source
public string GetDirectory(string pluginName)
Returns
System.String
: Plugin directory path.
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginName | Plugin 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
public T LoadForType<T>(string pluginName) where T : IPluginConfiguration
Returns
<T>
: Plugin Configuration.
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginName | Plugin Name. |
Type Parameters
Name | Description |
---|---|
T | Configuration Type. |
GetConfigFile(string)
Get FileInfo to plugin config file.
View Source
public FileInfo GetConfigFile(string pluginName)
Returns
System.IO.FileInfo
: FileInfo of the config file.
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginName | InternalName of the plugin. |