diff --git a/src/Impostor.Server/Plugins/PluginLoader.cs b/src/Impostor.Server/Plugins/PluginLoader.cs index f753bd135..9620eb4bb 100644 --- a/src/Impostor.Server/Plugins/PluginLoader.cs +++ b/src/Impostor.Server/Plugins/PluginLoader.cs @@ -24,6 +24,8 @@ public static IHostBuilder UsePluginLoader(this IHostBuilder builder, PluginConf // Add the plugins and libraries. var pluginPaths = new List(config.Paths); var libraryPaths = new List(config.LibraryPaths); + CheckPaths(pluginPaths); + CheckPaths(libraryPaths); var rootFolder = Directory.GetCurrentDirectory(); @@ -120,6 +122,18 @@ public static IHostBuilder UsePluginLoader(this IHostBuilder builder, PluginConf return builder; } + private static void CheckPaths(IEnumerable paths) + { + foreach (var path in paths) + { + if (!Directory.Exists(path)) + { + Logger.Warning("Directory \"{path}\" was specified in the PluginLoader configuration, but this directory doesn't exist!", path); + } + } + + } + private static void RegisterAssemblies( IEnumerable paths, Matcher matcher,