2021-05-30 20:22:26 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Dalamud.Game.Command;
|
|
|
|
|
|
|
|
|
|
namespace RoleplayersToolbox {
|
|
|
|
|
internal class Commands : IDisposable {
|
|
|
|
|
private Plugin Plugin { get; }
|
|
|
|
|
|
|
|
|
|
internal Commands(Plugin plugin) {
|
|
|
|
|
this.Plugin = plugin;
|
|
|
|
|
|
2021-08-24 05:17:42 +00:00
|
|
|
|
this.Plugin.CommandManager.AddHandler("/rptools", new CommandInfo(this.OnCommand) {
|
2021-06-01 00:46:11 +00:00
|
|
|
|
HelpMessage = "Open The Roleplayer's Toolbox",
|
|
|
|
|
});
|
2021-05-30 20:22:26 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispose() {
|
2021-08-24 05:17:42 +00:00
|
|
|
|
this.Plugin.CommandManager.RemoveHandler("/rptools");
|
2021-05-30 20:22:26 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnCommand(string command, string arguments) {
|
|
|
|
|
this.Plugin.Ui.ShowInterface ^= true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|