Interface ICodexItemProvider<T extends ItemType>
- All Known Implementing Classes:
ItemsAdderProvider,NexoProvider,OraxenProvider,VanillaProvider
public interface ICodexItemProvider<T extends ItemType>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault voidGet an item from the provider.getItem(org.bukkit.inventory.ItemStack itemStack) Get the ItemType of this provider corresponding to the provided ItemStack.booleanisCustomItem(org.bukkit.inventory.ItemStack item) Check if the given item is from this provider.booleanisCustomItemOfId(org.bukkit.inventory.ItemStack item, String id) Check if the given item is from this provider and has the given id.
-
Method Details
-
assertEnabled
- Throws:
MissingProviderException
-
pluginName
String pluginName() -
getNamespace
String getNamespace() -
getCategory
ICodexItemProvider.Category getCategory() -
getItem
Get an item from the provider.- Parameters:
id- The id of the item.- Returns:
- The item with the given id.
-
getItem
Get the ItemType of this provider corresponding to the provided ItemStack.- Parameters:
itemStack- The item to get the ItemType from.- Returns:
- the ItemType associated to the provided ItemStack, or null if not found.
-
isCustomItem
boolean isCustomItem(org.bukkit.inventory.ItemStack item) Check if the given item is from this provider.- Parameters:
item- The item to check.- Returns:
- Whether the item is from this provider.
-
isCustomItemOfId
Check if the given item is from this provider and has the given id.- Parameters:
item- The item to check.id- The id to check.- Returns:
- Whether the item is from this provider and has the given id.
-