mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
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:
parent
f5c768f3e5
commit
ec9cb5752f
3 changed files with 1 additions and 37 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue