Package com.ranull.graves.integration
Class ItemBridge
java.lang.Object
com.ranull.graves.integration.ItemBridge
- All Implemented Interfaces:
com.jojodmo.itembridge.ItemBridgeListener
Integration with the ItemBridge plugin for handling custom items related to graves.
-
Constructor Summary
ConstructorsConstructorDescriptionItemBridge(Graves plugin) Constructs an ItemBridge instance and registers it with the ItemBridge plugin. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackfetchItemStack(@NotNull String string) Fetches an ItemStack based on a string identifier.getItemName(@NotNull org.bukkit.inventory.ItemStack itemStack) Gets the name of the item based on its ItemStack.com.jojodmo.itembridge.ItemBridgeListenerPriorityGets the priority of the ItemBridge listener.booleanChecks if the given ItemStack matches the specified string identifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jojodmo.itembridge.ItemBridgeListener
fetchItemStack, fetchItemStack, fetchItemStack, getAvailableBlocks, getAvailableItems, getBlock, getBlockParameters, getParameters, isBlock, isBlock, isItem, isReady, removeBlock, setBlock, setBlock
-
Constructor Details
-
ItemBridge
Constructs an ItemBridge instance and registers it with the ItemBridge plugin.- Parameters:
plugin- The Graves plugin instance.
-
-
Method Details
-
getPriority
public com.jojodmo.itembridge.ItemBridgeListenerPriority getPriority()Gets the priority of the ItemBridge listener.- Specified by:
getPriorityin interfacecom.jojodmo.itembridge.ItemBridgeListener- Returns:
- The priority of the listener.
-
fetchItemStack
Fetches an ItemStack based on a string identifier.- Specified by:
fetchItemStackin interfacecom.jojodmo.itembridge.ItemBridgeListener- Parameters:
string- The string identifier for the item.- Returns:
- The ItemStack corresponding to the identifier, or null if not found.
-
getItemName
Gets the name of the item based on its ItemStack.- Specified by:
getItemNamein interfacecom.jojodmo.itembridge.ItemBridgeListener- Parameters:
itemStack- The ItemStack for which to retrieve the name.- Returns:
- The name of the item, or null if not recognized.
-
isItem
public boolean isItem(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack, @NotNull @NotNull String string) Checks if the given ItemStack matches the specified string identifier.- Specified by:
isItemin interfacecom.jojodmo.itembridge.ItemBridgeListener- Parameters:
itemStack- The ItemStack to check.string- The string identifier to compare with.- Returns:
- True if the ItemStack matches the identifier, false otherwise.
-