Merge remote-tracking branch 'origin/master'

This commit is contained in:
SpoinkyNL committed 2020-06-25 18:46:14 +02:00
commit d3eaef59da
18 files changed
+412 -182

No files matched your search

+18 -1
View File
@@ -52,13 +52,30 @@ namespace Artemis.Core.Plugins.Abstract
if (enable && !Enabled)
{
Enabled = true;
EnablePlugin();
PluginInfo.Enabled = true;
// If enable failed, put it back in a disabled state
try
{
EnablePlugin();
}
catch
{
Enabled = false;
PluginInfo.Enabled = false;
throw;
}
OnPluginEnabled();
}
else if (!enable && Enabled)
{
Enabled = false;
PluginInfo.Enabled = false;
// Even if disable failed, still leave it in a disabled state to avoid more issues
DisablePlugin();
OnPluginDisabled();
}
}