// Initialization public void Initialize(DalamudPluginInterface pluginInterface) { // Configuration mPluginInterface = pluginInterface; mConfiguration = mPluginInterface.GetPluginConfig() as Configuration ?? new Configuration(); mConfiguration.Initialize(mPluginInterface); MemoryHandler.Init(mPluginInterface); ZoneInfoHandler.Init(mPluginInterface); // Text Command Initialization mPluginInterface.CommandManager.AddHandler(mTextCommandName, new CommandInfo(ProcessTextCommand) { HelpMessage = "Performs waymark preset commands. Use \"/pwaymark help\" for detailed usage information." }); // UI Initialization mUI = new PluginUI(mConfiguration, mPluginInterface); mPluginInterface.UiBuilder.OnBuildUi += DrawUI; mPluginInterface.UiBuilder.OnOpenConfigUi += (sender, args) => DrawConfigUI(); mUI.SetCurrentTerritoryTypeID(mPluginInterface.ClientState.TerritoryType); mUI.Initialize(); // Event Subscription mPluginInterface.ClientState.TerritoryChanged += OnTerritoryChanged; // Tell the user if there's something out of the ordinary. if (!MemoryHandler.FoundSavedPresetSigs()) { mPluginInterface.Framework.Gui.Chat.Print("Error initializing WaymarkPresetPlugin: Cannot write to or read from game."); } }