Annotation Interface ConditionalOnPlugin


@Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface ConditionalOnPlugin
Activates the annotated component only if all given plugins are installed.

Add the plugins to softdepend in your plugin.yml so they are loaded before yours. Supported on the same elements as Conditional.

 @Service
 @ConditionalOnPlugin("Vault")
 public class VaultEconomyService implements EconomyService { ... }
 
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The names of the plugins that must be installed.
  • Element Details

    • value

      String[] value
      The names of the plugins that must be installed.