Class ItemCategory
java.lang.Object
com.github.darksoulq.abyssallib.world.item.ItemCategory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA fluent builder for creatingItemCategoryinstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemCategory.Builderbuilder(net.kyori.adventure.key.Key id) Creates a new builder for an ItemCategory.org.bukkit.inventory.ItemStackgetIcon()Generates a new ItemStack to be used as the visual icon for this category.net.kyori.adventure.key.KeygetId()Retrieves the unique Key associated with this category.getItems()Retrieves the list of all items registered to this category.net.kyori.adventure.text.ComponentgetTitle()Gets the translatable title of this category.
-
Method Details
-
getId
public net.kyori.adventure.key.Key getId()Retrieves the unique Key associated with this category.- Returns:
- The
Keyof 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
Componentrepresenting 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
ItemStackrepresenting this category's icon.
-
getItems
-
builder
Creates a new builder for an ItemCategory.- Parameters:
id- TheKeyfor the new category.- Returns:
- A new
ItemCategory.Builderinstance.
-