Annotation Interface FolderConfig
Marks a class as a folder-based config (folder-config).
Each file in the folder becomes an instance of this class.
This annotation is repeatable, allowing one item class to be used for multiple folder configs from different folders.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionField that controls whether instance is enabled.Prefix for files to exclude from loading.Field to inject the instance ID (filename without extension).Folder config name used for lookup and injection.Naming strategy for field to YAML key conversion.Field to use for ordering instances.Resource folder path (inside JAR) to copy defaults from.
-
Element Details
-
folder
String folderFolder path relative to plugin data folder. Example: "boosters/"- Returns:
- the folder path
-
-
-
name
String nameFolder config name used for lookup and injection. If empty, the name is derived from the folder path (last segment after normalizing slashes).- Returns:
- the folder config name
- Default:
- ""
-
idField
String idFieldField to inject the instance ID (filename without extension). If empty, looks for a field annotated with @NodeKey.- Returns:
- the ID field name
- Default:
- ""
-
orderBy
String orderByField to use for ordering instances. Use "filename" for alphabetical by filename.- Returns:
- the order field name
- Default:
- "filename"
-
enabledField
String enabledFieldField that controls whether instance is enabled. Set to empty string to disable enabled filtering. If the specified field does not exist on the class, enabled filtering is automatically disabled.- Returns:
- the enabled field name
- Default:
- ""
-
resource
String resourceResource folder path (inside JAR) to copy defaults from. Copied only if destination folder is empty or missing. Example: "defaults/kits/"- Returns:
- the resource folder path
- Default:
- ""
-
excludePrefix
String excludePrefixPrefix for files to exclude from loading. Files starting with this prefix will be ignored.- Returns:
- the exclude prefix
- Default:
- "_"
-
naming
NamingStrategy namingNaming strategy for field to YAML key conversion.- Returns:
- the naming strategy
- Default:
- SNAKE_CASE
-