Interface ICodexItemProvider<T extends ItemType>

All Known Implementing Classes:
ItemsAdderProvider, NexoProvider, OraxenProvider, VanillaProvider

public interface ICodexItemProvider<T extends ItemType>
  • Method Details

    • assertEnabled

      default void assertEnabled() throws MissingProviderException
      Throws:
      MissingProviderException
    • pluginName

      String pluginName()
    • getNamespace

      String getNamespace()
    • getCategory

    • getItem

      @Nullable T getItem(String id)
      Get an item from the provider.
      Parameters:
      id - The id of the item.
      Returns:
      The item with the given id.
    • getItem

      @Nullable T getItem(org.bukkit.inventory.ItemStack itemStack)
      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

      boolean isCustomItemOfId(org.bukkit.inventory.ItemStack item, String id)
      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.