Tourist/Tourist/Commands.cs

25 lines
658 B
C#
Raw Permalink Normal View History

2021-03-21 05:48:48 +00:00
using System;
using Dalamud.Game.Command;
namespace Tourist {
public class Commands : IDisposable {
private Plugin Plugin { get; }
public Commands(Plugin plugin) {
this.Plugin = plugin;
2021-08-23 06:36:41 +00:00
this.Plugin.CommandManager.AddHandler("/tourist", new CommandInfo(this.OnCommand) {
2021-03-21 05:48:48 +00:00
HelpMessage = "Opens the Tourist interface",
});
}
public void Dispose() {
2021-08-23 06:36:41 +00:00
this.Plugin.CommandManager.RemoveHandler("/tourist");
2021-03-21 05:48:48 +00:00
}
private void OnCommand(string command, string arguments) {
this.Plugin.Ui.Show = !this.Plugin.Ui.Show;
}
}
}