Moved Console activity on another thread

This commit is contained in:
2022-07-17 18:53:56 +03:00
parent c415fa1c0c
commit 17f68a8e5e
10 changed files with 73 additions and 73 deletions

View File

@@ -85,9 +85,20 @@ public class PluginLoader
private void OnEventLoaded(LoaderArgs e)
{
if (e.IsLoaded) ((DBEvent)e.Plugin!).Start(_client);
try
{
if (e.IsLoaded)
((DBEvent)e.Plugin!).Start(_client);
onEVELoad?.Invoke(((DBEvent)e.Plugin!).name, e.TypeName!, e.IsLoaded, e.Exception);
onEVELoad?.Invoke(((DBEvent)e.Plugin!).name, e.TypeName!, e.IsLoaded, e.Exception);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
Console.WriteLine("Plugin: " + e.PluginName);
Console.WriteLine("Type: " + e.TypeName);
Console.WriteLine("IsLoaded: " + e.IsLoaded);
}
}
private void OnCommandLoaded(LoaderArgs e)