Annotation Interface AutoRegister
Classes annotated with this will be processed by the plugin's registration system.
Hint: Use this annotation to register commands, events, or custom items.
It should only be used when the class extends CustomItem, SimpleCommand, or Listener.
How the index works: during compilation, the
singularitylib-processor annotation processor collects every class
annotated with this and writes it into
META-INF/singularitylib/auto-register-index.properties inside the built
jar. At plugin startup Register reads that index instead of scanning the
classpath with Reflections. The annotation keeps CLASS retention so it is
always present in compiled class files and visible to the processor.
- See Also:
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueIndicates that the annotated class should be automatically registered by the plugin. This annotation is used to mark classes that need to be registered during the plugin's startup process.Classes annotated with this will be processed by the plugin's registration system.
Hint: Use this annotation to register commands, events, or custom items. It should only be used when the class extends
CustomItem,SimpleCommand, orListener.- Returns:
- the registration value, defaults to empty string
- Default:
""
-