Interface Button

All Known Implementing Classes:
ClickableButton, CompositeButton, CycleButton, SpanningButton, StaticButton, TransformingButton

Sealed root of the button algebra. A button is the union of its display item, attached data, and (variant-specific) interaction behaviour.

Variants:

  • Method Details

    • item

      @NotNull @NotNull org.bukkit.inventory.ItemStack item()
    • data

      @NotNull @NotNull DataRegistry data()
    • withItem

      @NotNull @NotNull Button withItem(@NotNull @NotNull org.bukkit.inventory.ItemStack item)
    • dispatch

      void dispatch(@NotNull @NotNull MenuView<?,?> view, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent event)
    • of

      @NotNull static @NotNull StaticButton of(@NotNull @NotNull org.bukkit.inventory.ItemStack item)
    • clickable

      @NotNull static @NotNull ClickableButton clickable(@NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull ClickAction action)
    • transforming

      @NotNull static @NotNull TransformingButton transforming(@NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull BiFunction<MenuView<?,?>,org.bukkit.event.inventory.InventoryClickEvent,Button> transformer)
    • spanning

      @NotNull static @NotNull SpanningButton spanning(@NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull Set<Slot> footprint, @NotNull @NotNull ClickAction action)
    • composite

      @NotNull static @NotNull CompositeButton composite(@NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull Button... children)
    • cycle

      @NotNull static @NotNull CycleButton cycle(@NotNull @NotNull Button... states)