2024-02-07 07:58:16 +00:00
|
|
|
using System;
|
2024-02-07 07:14:46 +00:00
|
|
|
using Dalamud.Configuration;
|
2024-02-06 22:21:01 +00:00
|
|
|
using Dalamud.Plugin;
|
|
|
|
|
|
|
|
namespace SamplePlugin
|
|
|
|
{
|
|
|
|
[Serializable]
|
|
|
|
public class Configuration : IPluginConfiguration
|
|
|
|
{
|
2024-02-07 07:58:16 +00:00
|
|
|
public int Version { get; set; }
|
2024-02-06 22:21:01 +00:00
|
|
|
|
|
|
|
public bool SomePropertyToBeSavedAndWithADefault { get; set; } = true;
|
|
|
|
|
|
|
|
// the below exist just to make saving less cumbersome
|
|
|
|
[NonSerialized]
|
2024-02-07 07:14:46 +00:00
|
|
|
private DalamudPluginInterface? pluginInterface;
|
2024-02-06 22:21:01 +00:00
|
|
|
|
|
|
|
public void Initialize(DalamudPluginInterface pluginInterface)
|
|
|
|
{
|
2024-02-07 07:14:46 +00:00
|
|
|
this.pluginInterface = pluginInterface;
|
2024-02-06 22:21:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void Save()
|
|
|
|
{
|
2024-02-07 07:58:16 +00:00
|
|
|
pluginInterface!.SavePluginConfig(this);
|
2024-02-06 22:21:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|