Annotation Interface ItemList


@Retention(RUNTIME) @Target(FIELD) @Documented public @interface ItemList
Renders a searchable selector for Minecraft items

The annotated field must be a String[] or List<String> containing namespaced item registry IDs for example minecraft:diamond

Selected entries are ordered and can be removed and may be reordered

Use maxEntries() with a value of 1 for a single-item selector

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Label of the button that opens the item selector
    boolean
    Deprecated.
    No longer needed because OneConfig translates known keys automatically
     
    boolean
    Deprecated.
    No longer needed because OneConfig translates known keys automatically
     
    boolean
    Deprecated.
    No longer needed because OneConfig translates known keys automatically
    boolean
     
     
    int
    Maximum number of selected items and 0 means unlimited
    boolean
    Allow the user to drag selected items into a different order
     
    boolean
    Deprecated.
    No longer needed because OneConfig translates known keys automatically
    boolean
    Deprecated.
    No longer needed because OneConfig translates known keys automatically
  • Element Details

    • title

      String title
    • titleTranslation

      @Deprecated boolean titleTranslation
      Deprecated.
      No longer needed because OneConfig translates known keys automatically
      Default:
      false
    • description

      String description
      Default:
      ""
    • descriptionTranslation

      @Deprecated boolean descriptionTranslation
      Deprecated.
      No longer needed because OneConfig translates known keys automatically
      Default:
      false
    • icon

      String icon
      Default:
      ""
    • category

      String category
      Default:
      "General"
    • categoryTranslation

      @Deprecated boolean categoryTranslation
      Deprecated.
      No longer needed because OneConfig translates known keys automatically
      Default:
      false
    • subcategory

      String subcategory
      Default:
      "General"
    • subcategoryTranslation

      @Deprecated boolean subcategoryTranslation
      Deprecated.
      No longer needed because OneConfig translates known keys automatically
      Default:
      false
    • maxEntries

      int maxEntries
      Maximum number of selected items and 0 means unlimited
      Default:
      0
    • reorderable

      boolean reorderable
      Allow the user to drag selected items into a different order
      Default:
      true
    • addText

      @TranslatedDefault("oneconfig.itemlist.add") String addText
      Label of the button that opens the item selector
      Default:
      "oneconfig.itemlist.add"
    • addTextTranslation

      @Deprecated boolean addTextTranslation
      Deprecated.
      No longer needed because OneConfig translates known keys automatically
      Default:
      false
    • fullWidth

      boolean fullWidth
      Default:
      false