Annotation Interface FolderConfig


@Retention(RUNTIME) @Target(TYPE) @Repeatable(FolderConfigs.class) public @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
    Modifier and Type
    Required Element
    Description
    Folder path relative to plugin data folder.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Field 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 folder
      Folder path relative to plugin data folder. Example: "boosters/"
      Returns:
      the folder path
    • name

      String name
      Folder 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 idField
      Field 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 orderBy
      Field to use for ordering instances. Use "filename" for alphabetical by filename.
      Returns:
      the order field name
      Default:
      "filename"
    • enabledField

      String enabledField
      Field 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 resource
      Resource 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 excludePrefix
      Prefix for files to exclude from loading. Files starting with this prefix will be ignored.
      Returns:
      the exclude prefix
      Default:
      "_"
    • naming

      Naming strategy for field to YAML key conversion.
      Returns:
      the naming strategy
      Default:
      SNAKE_CASE