Class ClickableItem

java.lang.Object
com.burchard36.api.utils.ItemWrapper
com.burchard36.api.inventory.ClickableItem

public class ClickableItem extends ItemWrapper
A clickable item the executes methods on a PluginInventory's InventoryClickEvent if, you have the functional interface method set of course
  • Field Details

  • Constructor Details

    • ClickableItem

      public ClickableItem(org.bukkit.Material type, int amount)
      Creates a instnace of this class with a Material and a Integer amount
      Parameters:
      type - A Material to set for this item
      amount - A Integer amount to set for this item
    • ClickableItem

      public ClickableItem(org.bukkit.Material type, int amount, String itemName, List<String> itemLore)
      Supports creating a lore with a material, amount, item name, and item lore
      Parameters:
      type - A Material
      amount - A Integer amount for this ItemStack to have
      itemName - A String name for this item to have, supports ampersand symbols for coloring TODO: Make this Nullable
      itemLore - A List of String for the lore to have, supports ampersand symbols for coloring TODO: Make this Nullable
  • Method Details

    • onClick

      public ClickableItem onClick(GuiClickableItem clickableItemAction)
      Sets the onClick action of this ClickableItem
      Parameters:
      clickableItemAction - The GuiClickableItem action to set for this functional interface (Its a lambda function)
      Returns:
      instance of this ClickableItem
    • build

      public org.bukkit.inventory.ItemStack build()
      returns the ItemStack that this class currently holds
      Returns:
      A ItemStack