Class VanillaProvider
java.lang.Object
studio.magemonkey.codex.api.items.providers.VanillaProvider
- All Implemented Interfaces:
ICodexItemProvider<VanillaProvider.VanillaItemType>
public class VanillaProvider
extends Object
implements ICodexItemProvider<VanillaProvider.VanillaItemType>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface studio.magemonkey.codex.api.items.providers.ICodexItemProvider
ICodexItemProvider.Category -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGet 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.
-
Field Details
-
NAMESPACE
- See Also:
-
-
Constructor Details
-
VanillaProvider
public VanillaProvider()
-
-
Method Details
-
assertEnabled
public void assertEnabled()- Specified by:
assertEnabledin interfaceICodexItemProvider<VanillaProvider.VanillaItemType>
-
pluginName
- Specified by:
pluginNamein interfaceICodexItemProvider<VanillaProvider.VanillaItemType>
-
getNamespace
- Specified by:
getNamespacein interfaceICodexItemProvider<VanillaProvider.VanillaItemType>
-
getCategory
- Specified by:
getCategoryin interfaceICodexItemProvider<VanillaProvider.VanillaItemType>
-
getItem
Description copied from interface:ICodexItemProviderGet an item from the provider.- Specified by:
getItemin interfaceICodexItemProvider<VanillaProvider.VanillaItemType>- Parameters:
id- The id of the item.- Returns:
- The item with the given id.
-
getItem
Description copied from interface:ICodexItemProviderGet the ItemType of this provider corresponding to the provided ItemStack.- Specified by:
getItemin interfaceICodexItemProvider<VanillaProvider.VanillaItemType>- Parameters:
itemStack- The item to get the ItemType from.- Returns:
- the ItemType associated to the provided ItemStack, or null if not found.
-
isCustomItem
public boolean isCustomItem(org.bukkit.inventory.ItemStack item) Description copied from interface:ICodexItemProviderCheck if the given item is from this provider.- Specified by:
isCustomItemin interfaceICodexItemProvider<VanillaProvider.VanillaItemType>- Parameters:
item- The item to check.- Returns:
- Whether the item is from this provider.
-
isCustomItemOfId
Description copied from interface:ICodexItemProviderCheck if the given item is from this provider and has the given id.- Specified by:
isCustomItemOfIdin interfaceICodexItemProvider<VanillaProvider.VanillaItemType>- Parameters:
item- The item to check.id- The id to check.- Returns:
- Whether the item is from this provider and has the given id.
-