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
This commit is contained in:
KazWolfe 2022-08-27 06:05:41 -07:00 committed by GitHub
parent f5c768f3e5
commit ec9cb5752f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 37 deletions

View file

@ -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<ChatGui>.Get();
chatGui.Print("Reloading...");
try
{
Service<PluginManager>.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<ChatGui>.Get();

View file

@ -780,19 +780,6 @@ namespace Dalamud.Interface.Internal
}
}
if (ImGui.MenuItem("Reload plugins"))
{
try
{
pluginManager.ReloadAllPluginsAsync().Wait();
}
catch (Exception ex)
{
Service<ChatGui>.Get().PrintError("Reload failed.");
PluginLog.Error(ex, "Plugin reload failed.");
}
}
if (ImGui.MenuItem("Scan dev plugins"))
{
pluginManager.ScanDevPlugins();

View file

@ -535,6 +535,7 @@ internal partial class PluginManager : IDisposable, IServiceType
/// Reload all loaded plugins.
/// </summary>
/// <returns>A task.</returns>
[Obsolete("This method should no longer be used and will be removed in a future release.")]
public Task ReloadAllPluginsAsync()
{
lock (this.pluginListLock)