From ec9cb5752f3b14318c92ff47082584c8849b74bb Mon Sep 17 00:00:00 2001 From: KazWolfe Date: Sat, 27 Aug 2022 06:05:41 -0700 Subject: [PATCH] Remove "Reload All Plugins" Command (#976) - Remove the "Reload All Plugins" MenuItem from /xldev - Remove the /xldreloadplugins Command - Mark `PluginManager.ReloadAllPluginsAsync()` as obsolete for removal --- Dalamud/Interface/Internal/DalamudCommands.cs | 24 ------------------- .../Interface/Internal/DalamudInterface.cs | 13 ---------- Dalamud/Plugin/Internal/PluginManager.cs | 1 + 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/Dalamud/Interface/Internal/DalamudCommands.cs b/Dalamud/Interface/Internal/DalamudCommands.cs index c58b99baa..49ce45a95 100644 --- a/Dalamud/Interface/Internal/DalamudCommands.cs +++ b/Dalamud/Interface/Internal/DalamudCommands.cs @@ -30,12 +30,6 @@ namespace Dalamud.Interface.Internal ShowInHelp = false, }); - commandManager.AddHandler("/xldreloadplugins", new CommandInfo(this.OnPluginReloadCommand) - { - HelpMessage = Loc.Localize("DalamudPluginReloadHelp", "Reloads all plugins."), - ShowInHelp = false, - }); - commandManager.AddHandler("/xlhelp", new CommandInfo(this.OnHelpCommand) { HelpMessage = Loc.Localize("DalamudCmdInfoHelp", "Shows list of commands available."), @@ -170,24 +164,6 @@ namespace Dalamud.Interface.Internal } } - private void OnPluginReloadCommand(string command, string arguments) - { - var chatGui = Service.Get(); - - chatGui.Print("Reloading..."); - - try - { - Service.Get().ReloadAllPluginsAsync().Wait(); - chatGui.Print("OK"); - } - catch (Exception ex) - { - Log.Error(ex, "Plugin reload failed."); - chatGui.PrintError("Reload failed."); - } - } - private void OnBadWordsAddCommand(string command, string arguments) { var chatGui = Service.Get(); diff --git a/Dalamud/Interface/Internal/DalamudInterface.cs b/Dalamud/Interface/Internal/DalamudInterface.cs index b985522a9..d008c9dd2 100644 --- a/Dalamud/Interface/Internal/DalamudInterface.cs +++ b/Dalamud/Interface/Internal/DalamudInterface.cs @@ -780,19 +780,6 @@ namespace Dalamud.Interface.Internal } } - if (ImGui.MenuItem("Reload plugins")) - { - try - { - pluginManager.ReloadAllPluginsAsync().Wait(); - } - catch (Exception ex) - { - Service.Get().PrintError("Reload failed."); - PluginLog.Error(ex, "Plugin reload failed."); - } - } - if (ImGui.MenuItem("Scan dev plugins")) { pluginManager.ScanDevPlugins(); diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs index f9c86587c..2865d4f4d 100644 --- a/Dalamud/Plugin/Internal/PluginManager.cs +++ b/Dalamud/Plugin/Internal/PluginManager.cs @@ -535,6 +535,7 @@ internal partial class PluginManager : IDisposable, IServiceType /// Reload all loaded plugins. /// /// A task. + [Obsolete("This method should no longer be used and will be removed in a future release.")] public Task ReloadAllPluginsAsync() { lock (this.pluginListLock)