Skip to content

Commit

Permalink
Improve plugin detection to allow inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
Quit committed Dec 8, 2018
1 parent 7e95280 commit f6eeb84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IllusionInjector/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private static IEnumerable<IPlugin> 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;
Expand Down

0 comments on commit f6eeb84

Please sign in to comment.