Annotation Interface RequiresPlugin


@Retention(RUNTIME) @Target(TYPE) public @interface RequiresPlugin
Marks a ServiceContainer that bridges to a specific third-party Bukkit plugin. The ServiceManager only instantiates the service if value() is installed on the server, and only registers it if the per-plugin <name>.Enabled flag in hooks-config.yml is true.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The plugin this service bridges to.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A class the plugin must expose, for telling forks and rewrites apart.
  • Element Details

    • value

      String value
      The plugin this service bridges to.
      Returns:
      the Bukkit plugin name to gate on
    • classPath

      String classPath
      A class the plugin must expose, for telling forks and rewrites apart.
      Returns:
      optional fully-qualified main-class name; if non-empty, the installed plugin must match this class. Used when multiple plugins share a name.
      Default:
      ""