Class DisplayButton

java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.DisplayButton

public class DisplayButton extends Object
A button that is displayed on the inventory
  • Field Details

    • EMPTY

      public static final DisplayButton EMPTY
      The empty button
  • Constructor Details

    • DisplayButton

      public DisplayButton()
  • Method Details

    • getItem

      @Nullable public @Nullable Item getItem()
      Get the item to display
      Returns:
      the item
    • setItem

      public DisplayButton setItem(@Nullable @Nullable Item item)
      Set the item to display
      Parameters:
      item - the item
      Returns:
      the current instance
    • getAction

      @Nullable public @Nullable Consumer<ViewerEvent> getAction()
      Get the action to handle the event
      Returns:
      the action
    • setAction

      public DisplayButton setAction(@Nullable @Nullable Consumer<ViewerEvent> action)
      Set the action to handle the event
      Parameters:
      action - the action
      Returns:
      the current instance
    • setClickAction

      public DisplayButton setClickAction(@Nullable @Nullable Consumer<ClickEvent> action)
      Set the action to handle the click event
      Parameters:
      action - the action
      Returns:
      the current instance
    • apply

      public void apply(DisplayButton displayButton)
      Apply the display button to this instance
      Parameters:
      displayButton - the display button