diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs
index 32ab7a868..697b37fcd 100644
--- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs
@@ -689,7 +689,15 @@ namespace Dalamud.Interface.Internal.Windows
this.installStatus = OperationStatus.Idle;
if (this.DisplayErrorContinuation(task, Locs.ErrorModal_InstallFail(manifest.Name)))
{
- this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} was successfully installed.", "Plugin installed!", Notifications.Notification.Type.Success);
+ if (task.Result.State == PluginState.Loaded)
+ {
+ this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} was successfully installed.", "Plugin installed!", Notifications.Notification.Type.Success);
+ }
+ else
+ {
+ this.dalamud.InterfaceManager.Notifications.AddNotification($"The plugin {manifest.Name} failed to load.", "Plugin not installed!", Notifications.Notification.Type.Error);
+ this.ShowErrorModal(Locs.ErrorModal_InstallFail(manifest.Name));
+ }
}
});
}
diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs
index e12b32b43..2c3c37e5f 100644
--- a/Dalamud/Plugin/Internal/PluginManager.cs
+++ b/Dalamud/Plugin/Internal/PluginManager.cs
@@ -370,7 +370,7 @@ namespace Dalamud.Plugin.Internal
/// If the testing version should be used.
/// The reason this plugin was loaded.
/// A representing the asynchronous operation.
- public async Task InstallPluginAsync(RemotePluginManifest repoManifest, bool useTesting, PluginLoadReason reason)
+ public async Task InstallPluginAsync(RemotePluginManifest repoManifest, bool useTesting, PluginLoadReason reason)
{
Log.Debug($"Installing plugin {repoManifest.Name} (testing={useTesting})");
@@ -447,9 +447,10 @@ namespace Dalamud.Plugin.Internal
Log.Information($"Installed plugin {manifest.Name} (testing={useTesting})");
- this.LoadPlugin(dllFile, manifest, reason);
+ var plugin = this.LoadPlugin(dllFile, manifest, reason);
this.NotifyInstalledPluginsChanged();
+ return plugin;
}
///
@@ -461,7 +462,7 @@ namespace Dalamud.Plugin.Internal
/// If this plugin should support development features.
/// If this plugin is being loaded at boot.
/// Don't load the plugin, just don't do it.
- public void LoadPlugin(FileInfo dllFile, LocalPluginManifest manifest, PluginLoadReason reason, bool isDev = false, bool isBoot = false, bool doNotLoad = false)
+ public LocalPlugin LoadPlugin(FileInfo dllFile, LocalPluginManifest manifest, PluginLoadReason reason, bool isDev = false, bool isBoot = false, bool doNotLoad = false)
{
var name = manifest?.Name ?? dllFile.Name;
var loadPlugin = !doNotLoad;
@@ -523,6 +524,7 @@ namespace Dalamud.Plugin.Internal
}
this.installedPlugins.Add(plugin);
+ return plugin;
}
///