Interface Button

All Superinterfaces:
Initializable

public interface Button extends Initializable
An interface for all buttons
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Button
    The empty button
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Check if the action of this button should be set even if the display item is null
    net.minestom.server.item.ItemStack
    Get the item stack for the unique id
    default void
    handleAction(UUID uuid, net.minestom.server.event.inventory.InventoryClickEvent event)
    Handle action for the unique id
    default boolean
    handleAction(UUID uuid, net.minestom.server.event.inventory.InventoryPreClickEvent event)
    Handle action for the unique id.

    Methods inherited from interface me.hsgamer.hscore.ui.property.Initializable

    init, stop
  • Field Details

    • EMPTY

      static final Button EMPTY
      The empty button
  • Method Details

    • getItemStack

      net.minestom.server.item.ItemStack getItemStack(UUID uuid)
      Get the item stack for the unique id
      Parameters:
      uuid - the unique id
      Returns:
      the item stack
    • handleAction

      default boolean handleAction(UUID uuid, net.minestom.server.event.inventory.InventoryPreClickEvent event)
      Handle action for the unique id. This action will be called before handleAction(UUID, InventoryClickEvent) so that you can cancel the click.
      Parameters:
      uuid - the unique id
      event - the click event
      Returns:
      true if the action can be continued to handleAction(UUID, InventoryClickEvent)
    • handleAction

      default void handleAction(UUID uuid, net.minestom.server.event.inventory.InventoryClickEvent event)
      Handle action for the unique id
      Parameters:
      uuid - the unique id
      event - the click event
    • forceSetAction

      default boolean forceSetAction(UUID uuid)
      Check if the action of this button should be set even if the display item is null
      Parameters:
      uuid - the unique id
      Returns:
      true if it should