Annotation Interface NumberList


@Retention(RUNTIME) @Target(FIELD) @Documented public @interface NumberList
Renders a user-editable list of numbers, each row being a number input with stepper arrows.

The annotated field must be a numeric array (int[], float[], double[], long[], ...) or a List of numbers. Entries are stored in the field's element type; for list fields the type is taken from the entries already present, falling back to Integer when min()/max()/step() are whole numbers.

This is the list counterpart of Number; see SliderList for the slider variant.

  • Element Details

    • title

      String title
    • titleTranslation

      @Deprecated boolean titleTranslation
      Deprecated.
      No longer needed. OneConfig now checks whether the given title is a translation key present in the active language, and translates it automatically when it is. Pass the translation key directly as the title and remove this flag.
      Default:
      false
    • description

      String description
      Default:
      ""
    • descriptionTranslation

      @Deprecated boolean descriptionTranslation
      Deprecated.
      No longer needed. OneConfig now checks whether the given description is a translation key present in the active language, and translates it automatically when it is. Pass the translation key directly as the description and remove this flag.
      Default:
      false
    • icon

      String icon
      Default:
      ""
    • category

      String category
      Default:
      "General"
    • categoryTranslation

      @Deprecated boolean categoryTranslation
      Deprecated.
      No longer needed. OneConfig now checks whether the given category is a translation key present in the active language, and translates it automatically when it is. Pass the translation key directly as the category and remove this flag.
      Default:
      false
    • subcategory

      String subcategory
      Default:
      "General"
    • subcategoryTranslation

      @Deprecated boolean subcategoryTranslation
      Deprecated.
      translation keys will be translated by default.
      Default:
      false
    • min

      float min
      Default:
      0.0f
    • max

      float max
      Default:
      100.0f
    • step

      float step
      Amount each press of the stepper arrows changes the entry by. 0 picks a sensible default.
      Default:
      0.0f
    • maxEntries

      int maxEntries
      Maximum number of entries the user may add. 0 means unlimited.
      Default:
      0
    • reorderable

      boolean reorderable
      Allow the user to drag entries to reorder them.
      Default:
      true
    • addText

      String addText
      Label of the button that appends a new entry.
      Default:
      "Add"
    • addTextTranslation

      @Deprecated boolean addTextTranslation
      Deprecated.
      No longer needed. OneConfig now checks whether the given addText is a translation key present in the active language, and translates it automatically when it is. Pass the translation key directly as the addText and remove this flag.
      Default:
      false