Annotation Interface ConfigOption
The ConfigOption
annotation is used to mark fields in a class that represent configuration options.
It allows specifying a configuration key and a default value for that key. This annotation is intended
to be used in conjunction with a configuration manager that can process these annotations to automatically
load, save, and repair configuration settings.
When a field in a class is annotated with ConfigOption
, it indicates that this field corresponds
to a specific setting in the plugin's configuration file. The key
element specifies the unique
configuration key, and the defaultValue
element provides a default value to be used if the configuration
does not already contain a value for the key.
Example usage:
public class SomeClass {
@ConfigOption(key = "database.url", defaultValue = "jdbc:mysql://localhost:3306/minecraft")
private String databaseUrl;
// Other configuration fields...
}
- Since:
- 2023-12-13
- Version:
- 1.0.0
- Author:
- notzune
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe default value for this option.