Interface ItemManager
- All Known Implementing Classes:
ItemManagerImpl
public interface ItemManager
This class is used to manage custom items.
-
Method Summary
Modifier and TypeMethodDescription@Nullable CustomItemgetCustomItem(int customModelData)Gets a custom item from its custom model data.@Nullable CustomItemgetCustomItem(@NonNull String namespaceKey)Gets a custom item from its namespace key.@NonNull List<CustomItem>Gets a list of all registered custom items.@Nullable org.bukkit.inventory.ItemStackgetItemStack(int customModelData)Gets an item stack from a custom item's custom model data.@Nullable org.bukkit.inventory.ItemStackgetItemStack(@NonNull String namespaceKey)Gets an item stack from a custom item's namespace key.booleanisCustomHat(@NonNull org.bukkit.inventory.ItemStack item)Gets if an item stack is a custom hat.
-
Method Details
-
getCustomItems
@NonNull List<CustomItem> getCustomItems()Gets a list of all registered custom items.- Returns:
- a list of all registered custom items
-
getCustomItem
Gets a custom item from its namespace key.- Parameters:
namespaceKey- the namespace key of the custom item- Returns:
- the custom item with the given namespace key. Will be null if there is nothing associated with the namespace key.
-
getCustomItem
Gets a custom item from its custom model data.- Parameters:
customModelData- the item's custom model data- Returns:
- the custom item with the given custom model data. Will be null if there is nothing associated with the custom model data.
-
getItemStack
Gets an item stack from a custom item's namespace key.- Parameters:
namespaceKey- the namespace key of the custom item- Returns:
- the custom item's item stack with the given namespace key. Will be null if there is nothing associated with the namespace key.
-
getItemStack
@Nullable org.bukkit.inventory.ItemStack getItemStack(int customModelData)Gets an item stack from a custom item's custom model data.- Parameters:
customModelData- the item's custom model data- Returns:
- the custom item's item stack with the given custom model data. Will be null if there is nothing associated with the custom model data.
-
isCustomHat
boolean isCustomHat(@NonNull org.bukkit.inventory.ItemStack item)Gets if an item stack is a custom hat.- Parameters:
item- the item stack to check- Returns:
- true if the item stack is a custom hat, false otherwise
-