diff --git a/MycroForge.CLI/Commands/Plugins.cs b/MycroForge.CLI/Commands/Plugins.cs index 4fecacc..584e03d 100644 --- a/MycroForge.CLI/Commands/Plugins.cs +++ b/MycroForge.CLI/Commands/Plugins.cs @@ -42,9 +42,10 @@ public static class Plugins .Where(IsPluginType) .Select(Activator.CreateInstance) .Cast() - .First(); + .FirstOrDefault(); - _loaded.Add(plugin); + if (plugin is not null) + _loaded.Add(plugin); } } diff --git a/MycroForge.CLI/Exceptions/BashException.cs b/MycroForge.CLI/Exceptions/BashException.cs deleted file mode 100644 index ae92c03..0000000 --- a/MycroForge.CLI/Exceptions/BashException.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace MycroForge.CLI.Exceptions; - -public class BashException : Exception -{ - private readonly string _message; - - public override string Message => _message; - - public BashException(string message) : base(message) - { - _message = message; - } -} \ No newline at end of file diff --git a/MycroForge.CLI/MycroForge.CLI.csproj b/MycroForge.CLI/MycroForge.CLI.csproj index f422424..5688505 100644 --- a/MycroForge.CLI/MycroForge.CLI.csproj +++ b/MycroForge.CLI/MycroForge.CLI.csproj @@ -11,11 +11,8 @@ - - -