CurrencyAlertClassic/SamplePlugin/Configuration.cs
2021-08-26 10:11:18 -04:00

30 lines
703 B
C#

using Dalamud.Configuration;
using Dalamud.Plugin;
using System;
namespace SamplePlugin
{
[Serializable]
public class Configuration : IPluginConfiguration
{
public int Version { get; set; } = 0;
public bool SomePropertyToBeSavedAndWithADefault { get; set; } = true;
// the below exist just to make saving less cumbersome
[NonSerialized]
private DalamudPluginInterface? pluginInterface;
public void Initialize(DalamudPluginInterface pluginInterface)
{
this.pluginInterface = pluginInterface;
}
public void Save()
{
this.pluginInterface!.SavePluginConfig(this);
}
}
}