Annotation Interface ConfigurationFile


@Target(TYPE) @Retention(RUNTIME) public @interface ConfigurationFile
Annotation to mark a class as a configuration file. Classes annotated with this will be automatically discovered and loaded by the configuration system.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to create the file if it doesn't exist.
    The subdirectory within the plugin's data folder where this config should be stored.
    The name of the configuration file (including extension).
  • Element Details

    • value

      String value
      The name of the configuration file (including extension). If not specified, defaults to the class name + ".yml"
      Default:
      ""
    • createIfNotExists

      boolean createIfNotExists
      Whether to create the file if it doesn't exist. Defaults to true.
      Default:
      true
    • subdirectory

      String subdirectory
      The subdirectory within the plugin's data folder where this config should be stored. If empty, the config will be stored in the root of the plugin's data folder.
      Default:
      ""