Annotation Type ConfigValue


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface ConfigValue
    Annotation used to mark a field as a config value. All properties are optional.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String defaultValue
      Default value of the config value.
      String description
      Description of the config value.
      boolean limited
      Whether to check the min and max values.
      double max
      Maximum value of the config value.
      double min
      Minimum value of the config value.
      String name
      Name of the config value.
      boolean required
      Whether the config value is required.
    • Element Detail

      • name

        String name
        Name of the config value. If not specified, the name of the field will be used
        Default:
        ""
      • required

        boolean required
        Whether the config value is required. If true, the config file must contain a value for this field
        Default:
        false
      • defaultValue

        String defaultValue
        Default value of the config value. If the config file doesn't contain a value for this field, this value will be used
        Default:
        ""
      • description

        String description
        Description of the config value. This will be used to generate the config file
        Default:
        ""
      • min

        double min
        Minimum value of the config value. If the config file contains a value that is lower than this, an exception will be thrown. For strings, this is the minimum length. Only check if limited is true
        Default:
        0.0
      • max

        double max
        Maximum value of the config value. If the config file contains a value that is higher than this, an exception will be thrown. For strings, this is the maximum length. Only check if limited is true
        Default:
        0.0
      • limited

        boolean limited
        Whether to check the min and max values. If false, the min and max values will be ignored
        Default:
        false