{"record":{"id":"23e64c53d62ad508","repo":"Pumpkin-MC/Pumpkin","slug":"plugin-not-found-0","errorCode":null,"errorMessage":"Plugin not found: {0}","messagePattern":"Plugin not found: (.+?)","errorType":"error_code","errorClass":"ManagerError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/plugin/mod.rs","lineNumber":219,"sourceCode":"\n/// Represents a successfully loaded plugin\n///\n/// OS specific issues\n/// - Windows: Plugin cannot be unloaded, it can be only active or not\nstruct LoadedPlugin {\n    metadata: PluginMetadata,\n    instance: Option<Arc<dyn Plugin>>,\n    loader: Arc<dyn PluginLoader>,\n    loader_data: Option<Box<dyn Any + Send + Sync>>,\n    is_active: bool,\n    context: Arc<Context>,\n    path: PathBuf,\n}\n\n/// Error types for plugin management\n#[derive(Error, Debug)]\npub enum ManagerError {\n    #[error(\"Plugin not found: {0}\")]\n    PluginNotFound(String),\n    #[error(\"Loader error: {0}\")]\n    LoaderError(#[from] LoaderError),\n    #[error(\"IO error: {0}\")]\n    IoError(#[from] std::io::Error),\n    #[error(\"Dependency error: {0}\")]\n    DependencyError(String),\n}\n\nimpl Default for PluginManager {\n    fn default() -> Self {\n        Self::new(true)\n    }\n}\n\nimpl PluginManager {\n    /// Create a new plugin manager with default loaders\n    #[must_use]","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/mod.rs#L201-L237","documentation":"ManagerError::PluginNotFound(String) is a thiserror variant of the plugin manager's error enum, formatted as \"Plugin not found: {0}\". It is returned by plugin-management operations (enable/disable/unload/get style calls) when the named plugin is not present in the PluginManager's registry. The String payload carries the plugin name that could not be resolved.","triggerScenarios":"Calling a PluginManager operation with a plugin name/ID that was never loaded, was already unloaded, or is misspelled; referencing a plugin by name before load_plugins completes or after it failed to load.","commonSituations":"Typo in a plugin name in server commands, config, or dependency declarations; a plugin failed to load earlier (loader error) so it is absent from the registry; referencing a plugin by its display name instead of its registered ID.","solutions":["List currently loaded plugins and use the exact registered name/ID","Confirm the plugin actually loaded — check earlier logs for loader errors for that jar","Fix the spelling/ID in the config or command that references the plugin","If managing programmatically, check the manager's plugin list before calling operations on a name"],"exampleFix":"// before\nmanager.unload_plugin(\"MyPlguin\")?; // typo\n// after\nif manager.get_plugin(\"MyPlugin\").is_some() {\n    manager.unload_plugin(\"MyPlugin\")?;\n}","handlingStrategy":"validation","validationCode":"let loaded: Vec<String> = manager.plugin_names();\nif !loaded.contains(&\"MyPlugin\".to_string()) {\n    eprintln!(\"MyPlugin is not loaded; available: {loaded:?}\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"match manager.unload_plugin(name) {\n    Ok(()) => info!(\"unloaded {name}\"),\n    Err(ManagerError::PluginNotFound(n)) => warn!(\"plugin {n} not loaded\"),\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Use the exact registered plugin ID, not a display name","Check the manager's plugin list before programmatic operations","Confirm the plugin loaded successfully at startup before referencing it","Keep dependency declarations using canonical plugin IDs"],"tags":["plugin-manager","not-found","thiserror"],"backgroundTag":"resource-not-found","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}