diff --git a/src/plugin/loader.rs b/src/plugin/loader.rs index 8c9754f..46508a6 100644 --- a/src/plugin/loader.rs +++ b/src/plugin/loader.rs @@ -94,9 +94,14 @@ impl PluginLoader { } pub fn load_all(&self, server: &Arc) { + let path = server.root.join("plugins"); + if !path.exists() { + fs::create_dir(&path).unwrap(); + } + // Load plugins LOGGER.info("Loading plugins"); - for entry in fs::read_dir(server.root.join("plugins")).unwrap() { + for entry in fs::read_dir(&path).unwrap() { let entry = entry.unwrap(); let path = entry.path();