Class CraftingInput

java.lang.Object
ke.ric.cooking.data.CraftingInput

public class CraftingInput extends Object
Represents an input item in a crafting session. Tracks both the ItemStack and metadata about whether it's a custom item.
  • Field Details

  • Constructor Details

    • CraftingInput

      public CraftingInput(org.bukkit.inventory.ItemStack itemStack, String itemId, boolean customItem)
    • CraftingInput

      public CraftingInput(org.bukkit.inventory.ItemStack itemStack, String itemId, boolean customItem, Set<String> customTags)
  • Method Details

    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack()
    • getItemId

      public String getItemId()
    • isCustomItem

      public boolean isCustomItem()
    • hasCustomTag

      public boolean hasCustomTag(String tag)
    • getCustomTags

      public Set<String> getCustomTags()
    • getProviderItem

      public ProviderItemRef getProviderItem()
    • isProviderItem

      public boolean isProviderItem()
    • fromVanilla

      public static CraftingInput fromVanilla(org.bukkit.inventory.ItemStack item)
      Create a CraftingInput from a vanilla ItemStack. Handles special cases like water bottles.
    • fromCustom

      public static CraftingInput fromCustom(org.bukkit.inventory.ItemStack item, String customId)
      Create a CraftingInput from a custom item.
    • fromProvider

      public static CraftingInput fromProvider(org.bukkit.inventory.ItemStack item, ProviderItemRef reference)
    • fromItem

      public static CraftingInput fromItem(org.bukkit.inventory.ItemStack item)
      Classify in strict ownership order: Heirloom, external provider, vanilla.
    • isWaterBottle

      public static boolean isWaterBottle(org.bukkit.inventory.ItemStack item)
      Check if an ItemStack is a water bottle (not a potion with effects). Water bottles are POTION items with PotionType.WATER and no custom effects.
    • createWaterBottle

      public static org.bukkit.inventory.ItemStack createWaterBottle()
      Create a water bottle ItemStack.
    • toString

      public String toString()
      Overrides:
      toString in class Object