Annotation Interface ConfigFile
Marks a class as a configuration file.
The class will be automatically loaded from and saved to the specified file.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to create the file if it doesn't exist.Template file to use when creating new config.
-
Element Details
-
value
String valuePath to the configuration file relative to plugin's data folder. If the path ends with a supported extension (yml/yaml/json/jsonc/toml), MagicUtils can switch formats via<name>.formatormagicutils.format.- Returns:
- the file path
-
autoCreate
boolean autoCreateWhether to create the file if it doesn't exist.- Returns:
- true to auto-create, false otherwise
- Default:
true
-
template
String templateTemplate file to use when creating new config.- Returns:
- path to template file in resources
- Default:
""
-