Annotation Interface Config


@Retention(RUNTIME) @Target(TYPE) public @interface Config
Marks a class as a configuration POJO that will be bound to a YAML file.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to generate default config file with comments.
    Named config root for programmatic access.
    Naming strategy for field to YAML key conversion.
    Resource path for bundled defaults (inside JAR).
    Path to the config file, relative to plugin data folder.
  • Element Details

    • value

      String value
      Path to the config file, relative to plugin data folder. Examples: "config.yml", "configs/database.yml"
      Returns:
      the config file path
      Default:
      ""
    • name

      String name
      Named config root for programmatic access. Examples: "main", "messages", "database"
      Returns:
      the config name
      Default:
      ""
    • naming

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

      boolean generateDefaults
      Whether to generate default config file with comments.
      Returns:
      true to generate defaults
      Default:
      true
    • resource

      String resource
      Resource path for bundled defaults (inside JAR).
      Returns:
      the resource path
      Default:
      ""