Class SimpleItem

java.lang.Object
xyz.xenondevs.invui.item.impl.AbstractItem
xyz.xenondevs.invui.item.impl.SimpleItem
All Implemented Interfaces:
Item
Direct Known Subclasses:
CommandItem

public class SimpleItem extends AbstractItem
A simple Item that does nothing.
  • Constructor Details

    • SimpleItem

      public SimpleItem(@NotNull @NotNull ItemProvider itemProvider)
    • SimpleItem

      public SimpleItem(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
    • SimpleItem

      public SimpleItem(@NotNull @NotNull ItemProvider itemProvider, @Nullable @Nullable Consumer<@NotNull Click> clickHandler)
    • SimpleItem

      public SimpleItem(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack, @Nullable @Nullable Consumer<@NotNull Click> clickHandler)
  • Method Details

    • getItemProvider

      public ItemProvider getItemProvider()
      Description copied from interface: Item
      Gets the ItemProvider. This method gets called every time a Window is notified (Item.notifyWindows()).
      Returns:
      The ItemProvider
    • handleClick

      public void handleClick(@NotNull @NotNull org.bukkit.event.inventory.ClickType clickType, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent event)
      Description copied from interface: Item
      A method called if the ItemStack associated to this Item has been clicked by a player.
      Parameters:
      clickType - The ClickType the Player performed.
      player - The Player who clicked on the ItemStack.
      event - The InventoryClickEvent associated with this click.