TheHeartOfTheParty/TheHeartOfTheParty/Plugin.cs

47 lines
1.2 KiB
C#
Raw Normal View History

2023-09-28 02:13:32 +00:00
using Dalamud.IoC;
2022-04-17 03:15:22 +00:00
using Dalamud.Plugin;
2023-09-28 02:13:32 +00:00
using Dalamud.Plugin.Services;
2022-04-17 03:15:22 +00:00
namespace TheHeartOfTheParty;
public class Plugin : IDalamudPlugin {
2023-09-28 02:13:32 +00:00
internal static string Name => "The Heart of the Party";
[PluginService]
internal static IGameInteropProvider GameInteropProvider { get; private set; }
2022-04-17 03:15:22 +00:00
[PluginService]
internal DalamudPluginInterface Interface { get; init; }
[PluginService]
2023-09-28 02:13:32 +00:00
internal IClientState ClientState { get; init; }
2022-04-17 03:15:22 +00:00
[PluginService]
2023-09-28 02:13:32 +00:00
internal ICommandManager CommandManager { get; init; }
2022-04-17 03:15:22 +00:00
2022-04-17 03:48:44 +00:00
[PluginService]
2023-09-28 02:13:32 +00:00
internal IDataManager DataManager { get; init; }
2022-04-17 03:15:22 +00:00
2022-04-17 03:48:44 +00:00
internal Configuration Config { get; }
internal GameFunctions Functions { get; }
internal PluginUi Ui { get; }
private Commands Commands { get; }
2022-04-17 03:15:22 +00:00
public Plugin() {
2022-04-17 03:48:44 +00:00
this.Config = this.Interface!.GetPluginConfig() as Configuration ?? new Configuration();
2022-08-26 02:25:07 +00:00
this.Functions = new GameFunctions();
2022-04-17 03:15:22 +00:00
this.Ui = new PluginUi(this);
2022-04-17 03:48:44 +00:00
this.Commands = new Commands(this);
2022-04-17 03:15:22 +00:00
}
public void Dispose() {
2022-04-17 03:48:44 +00:00
this.Commands.Dispose();
2022-04-17 03:15:22 +00:00
this.Ui.Dispose();
}
2022-04-17 03:48:44 +00:00
internal void SaveConfig() {
this.Interface.SavePluginConfig(this.Config);
}
2022-04-17 03:15:22 +00:00
}