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, can be removed and may be reordered. Use maxEntries() with a value of 1 for a single-item selector.

  • Element Details

    • title

      String title
    • titleTranslation

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

      String description
      Default:
      ""
    • descriptionTranslation

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

      String icon
      Default:
      ""
    • category

      String category
      Default:
      "General"
    • categoryTranslation

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

      String subcategory
      Default:
      "General"
    • subcategoryTranslation

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

      int maxEntries
      Maximum number of selected items. 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. OneConfig translates known keys automatically.
      Default:
      false