Pumpkin-MC/Pumpkin · error · ManagerError

Plugin not found

Error message

Plugin not found: {0}

What it means

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.

Solutions

  1. List currently loaded plugins and use the exact registered name/ID
  2. Confirm the plugin actually loaded — check earlier logs for loader errors for that jar
  3. Fix the spelling/ID in the config or command that references the plugin
  4. If managing programmatically, check the manager's plugin list before calling operations on a name

Example fix

// before
manager.unload_plugin("MyPlguin")?; // typo
// after
if manager.get_plugin("MyPlugin").is_some() {
    manager.unload_plugin("MyPlugin")?;
}
Defensive patterns

Strategy: validation

Validate before calling

let loaded: Vec<String> = manager.plugin_names();
if !loaded.contains(&"MyPlugin".to_string()) {
    eprintln!("MyPlugin is not loaded; available: {loaded:?}");
    return;
}

Try / catch

match manager.unload_plugin(name) {
    Ok(()) => info!("unloaded {name}"),
    Err(ManagerError::PluginNotFound(n)) => warn!("plugin {n} not loaded"),
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/23e64c53d62ad508. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin/src/plugin/mod.rs:219

/// Represents a successfully loaded plugin
///
/// OS specific issues
/// - Windows: Plugin cannot be unloaded, it can be only active or not
struct LoadedPlugin {
    metadata: PluginMetadata,
    instance: Option<Arc<dyn Plugin>>,
    loader: Arc<dyn PluginLoader>,
    loader_data: Option<Box<dyn Any + Send + Sync>>,
    is_active: bool,
    context: Arc<Context>,
    path: PathBuf,
}

/// Error types for plugin management
#[derive(Error, Debug)]
pub enum ManagerError {
    #[error("Plugin not found: {0}")]
    PluginNotFound(String),
    #[error("Loader error: {0}")]
    LoaderError(#[from] LoaderError),
    #[error("IO error: {0}")]
    IoError(#[from] std::io::Error),
    #[error("Dependency error: {0}")]
    DependencyError(String),
}

impl Default for PluginManager {
    fn default() -> Self {
        Self::new(true)
    }
}

impl PluginManager {
    /// Create a new plugin manager with default loaders
    #[must_use]

View on GitHub (pinned to 8d4639e25a)