Annotation Interface PluginDependency


Annotation that declares a dependency on another plugin.

Use this annotation to specify that your plugin requires another plugin to be loaded and available. The dependent plugin will be loaded before your plugin, ensuring that its classes and resources are available.

This annotation is repeatable, allowing you to declare multiple dependencies:


 @PluginDependency(CoreUtilsPlugin.class)
 @PluginDependency(OverlayPlugin.class)
 @PluginDescriptor(name = "My Plugin")
 public class MyPlugin extends Plugin {
     // Can now use classes from CoreUtilsPlugin and OverlayPlugin
 }
 

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Plugin>
    The plugin class that this plugin depends on.
  • Element Details

    • value

      Class<? extends Plugin> value
      The plugin class that this plugin depends on.

      The specified plugin will be loaded and initialized before this plugin.

      Returns:
      the dependent plugin class