mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Disable unloaded dev plugins at boot
This commit is contained in:
parent
85113e263f
commit
2302f15c84
1 changed files with 8 additions and 1 deletions
|
|
@ -455,6 +455,10 @@ namespace Dalamud.Plugin.Internal
|
|||
var devPlugin = new LocalDevPlugin(this.dalamud, dllFile, manifest);
|
||||
loadPlugin &= !isBoot || devPlugin.StartOnBoot;
|
||||
|
||||
// If we're not loading it, make sure it's disabled
|
||||
if (!loadPlugin && !devPlugin.IsDisabled)
|
||||
devPlugin.Disable();
|
||||
|
||||
plugin = devPlugin;
|
||||
}
|
||||
else
|
||||
|
|
@ -479,14 +483,17 @@ namespace Dalamud.Plugin.Internal
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Dev plugins always get added to the list so they can be fiddled with in the UI
|
||||
if (plugin.IsDev)
|
||||
{
|
||||
// Dev plugins always get added to the list so they can be fiddled with in the UI
|
||||
Log.Information(ex, $"Dev plugin failed to load, adding anyways: {dllFile.Name}");
|
||||
plugin.Disable(); // Disable here, otherwise you can't enable+load later
|
||||
}
|
||||
else if (plugin.Manifest.DalamudApiLevel < DalamudApiLevel)
|
||||
{
|
||||
// Out of date plugins get added so they can be updated.
|
||||
Log.Information(ex, $"Plugin was outdated, adding anyways: {dllFile.Name}");
|
||||
// plugin.Disable(); // Don't disable, or it gets deleted next boot.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue