Class ItemBridge

java.lang.Object
com.ranull.graves.integration.ItemBridge
All Implemented Interfaces:
com.jojodmo.itembridge.ItemBridgeListener

public final class ItemBridge extends Object implements com.jojodmo.itembridge.ItemBridgeListener
Integration with the ItemBridge plugin for handling custom items related to graves.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private com.jojodmo.itembridge.ItemBridge
     
    private final Graves
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an ItemBridge instance and registers it with the ItemBridge plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    fetchItemStack(@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.ItemBridgeListenerPriority
    Gets the priority of the ItemBridge listener.
    boolean
    isItem(@NotNull org.bukkit.inventory.ItemStack itemStack, @NotNull String string)
    Checks if the given ItemStack matches the specified string identifier.
    private void
    Registers the ItemBridge listener with the ItemBridge plugin.
    private void
    Unregisters the current ItemBridge listener if it exists.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.jojodmo.itembridge.ItemBridgeListener

    fetchItemStack, fetchItemStack, fetchItemStack, getAvailableBlocks, getAvailableItems, getBlock, getBlockParameters, getParameters, isBlock, isBlock, isItem, isReady, removeBlock, setBlock, setBlock
  • Field Details

    • plugin

      private final Graves plugin
    • itemBridge

      private com.jojodmo.itembridge.ItemBridge itemBridge
  • Constructor Details

    • ItemBridge

      public ItemBridge(Graves plugin)
      Constructs an ItemBridge instance and registers it with the ItemBridge plugin.
      Parameters:
      plugin - The Graves plugin instance.
  • Method Details

    • unregister

      private void unregister()
      Unregisters the current ItemBridge listener if it exists.
    • register

      private void register()
      Registers the ItemBridge listener with the ItemBridge plugin.
    • getPriority

      public com.jojodmo.itembridge.ItemBridgeListenerPriority getPriority()
      Gets the priority of the ItemBridge listener.
      Specified by:
      getPriority in interface com.jojodmo.itembridge.ItemBridgeListener
      Returns:
      The priority of the listener.
    • fetchItemStack

      public org.bukkit.inventory.ItemStack fetchItemStack(@NotNull @NotNull String string)
      Fetches an ItemStack based on a string identifier.
      Specified by:
      fetchItemStack in interface com.jojodmo.itembridge.ItemBridgeListener
      Parameters:
      string - The string identifier for the item.
      Returns:
      The ItemStack corresponding to the identifier, or null if not found.
    • getItemName

      public String getItemName(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Gets the name of the item based on its ItemStack.
      Specified by:
      getItemName in interface com.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:
      isItem in interface com.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.