Updated Logger and Plugin Loading
This commit is contained in:
@@ -67,6 +67,9 @@ internal class Loader
|
||||
_ => PluginType.UNKNOWN
|
||||
};
|
||||
|
||||
if (pluginType == PluginType.UNKNOWN)
|
||||
throw new Exception($"Unknown plugin type for plugin with type {type.FullName} [{type.Assembly}]");
|
||||
|
||||
OnPluginLoaded?.Invoke(new PluginLoadResultData(type.FullName, pluginType, true, plugin: plugin));
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -72,7 +72,7 @@ public class PluginLoader
|
||||
case PluginType.ACTION:
|
||||
ICommandAction action = (ICommandAction)result.Plugin;
|
||||
if (action.RunType == InternalActionRunType.ON_STARTUP || action.RunType == InternalActionRunType.BOTH)
|
||||
action.ExecuteStartup();
|
||||
action.Execute(null);
|
||||
|
||||
if(action.RunType == InternalActionRunType.ON_CALL || action.RunType == InternalActionRunType.BOTH)
|
||||
Actions.Add(action);
|
||||
|
||||
Reference in New Issue
Block a user