Class ItemCategory

java.lang.Object
com.github.darksoulq.abyssallib.world.item.ItemCategory

public class ItemCategory extends Object
Represents a categorized collection of Item instances. Categories are identified by a unique Key and include an icon used for display in graphical user interfaces or creative menus.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A fluent builder for creating ItemCategory instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(net.kyori.adventure.key.Key id)
    Creates a new builder for an ItemCategory.
    org.bukkit.inventory.ItemStack
    Generates a new ItemStack to be used as the visual icon for this category.
    net.kyori.adventure.key.Key
    Retrieves the unique Key associated with this category.
    Retrieves the list of all items registered to this category.
    net.kyori.adventure.text.Component
    Gets the translatable title of this category.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getId

      public net.kyori.adventure.key.Key getId()
      Retrieves the unique Key associated with this category.
      Returns:
      The Key of this category.
    • getTitle

      public net.kyori.adventure.text.Component getTitle()
      Gets the translatable title of this category. The translation key follows the format: category.item.[namespace].[path]
      Returns:
      A Component representing the localized title.
    • getIcon

      public org.bukkit.inventory.ItemStack getIcon()
      Generates a new ItemStack to be used as the visual icon for this category.
      Returns:
      A new ItemStack representing this category's icon.
    • getItems

      public List<Item> getItems()
      Retrieves the list of all items registered to this category.
      Returns:
      An unmodifiable view of the Items in this category.
    • builder

      public static ItemCategory.Builder builder(net.kyori.adventure.key.Key id)
      Creates a new builder for an ItemCategory.
      Parameters:
      id - The Key for the new category.
      Returns:
      A new ItemCategory.Builder instance.