Interface PluginManager


public interface PluginManager
Loads plugins and exposes what is currently running.

Permissions are deliberately not part of this interface: they live in PermissionRegistry, reachable through Server.permissions(). Keeping the two apart means a plugin that only wants to declare permissions does not need a handle on the plugin loader, and the registry has no knowledge of plugin lifecycles.

Since:
0.1.0
  • Method Details

    • loaded

      Returns:
      metadata for every loaded plugin
    • plugin

      Optional<Plugin> plugin(String id)
      Looks up a loaded plugin by identifier.
      Parameters:
      id - the plugin identifier
      Returns:
      the plugin, if loaded
    • isEnabled

      boolean isEnabled(String id)
      Tests whether a plugin is currently enabled.
      Parameters:
      id - the plugin identifier
      Returns:
      true if enabled