From f6eeb843b9f05bdf75b2c5dde1b293c3b45656e6 Mon Sep 17 00:00:00 2001 From: Quit Date: Sat, 8 Dec 2018 14:38:15 +0100 Subject: [PATCH] Improve plugin detection to allow inheritance --- IllusionInjector/PluginManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IllusionInjector/PluginManager.cs b/IllusionInjector/PluginManager.cs index 84a3b34..51f93e3 100644 --- a/IllusionInjector/PluginManager.cs +++ b/IllusionInjector/PluginManager.cs @@ -110,7 +110,7 @@ private static IEnumerable LoadPluginsFromFile(string file, string exeN private static bool IsValidPlugin(Type type) { - return type.GetInterface("IPlugin") != null + return typeof(IPlugin).IsAssignableFrom(type) && !type.IsAbstract && !type.IsInterface && type.GetConstructor(Type.EmptyTypes) != null;