Interface ClickHandler

All Known Implementing Classes:
StaticClickHandler

public interface ClickHandler
Handles clicks before passing them onto a menu.

This allows for custom click handling logic outside of buttons to be implemented.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    handleClick(org.bukkit.event.inventory.InventoryClickEvent event)
    Handles a click on a menu.
    void
    handleDrag(org.bukkit.event.inventory.InventoryDragEvent event)
    Handles the drag on the menu.
    boolean
    isValidClick(org.bukkit.event.inventory.InventoryClickEvent event)
    Checks if a given click is valid.
  • Method Details

    • handleClick

      boolean handleClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Handles a click on a menu. If the given click was processed by the handler and should not be passed onto the menu, it should return true. Otherwise, it should return false.
      Parameters:
      event - event to handle
      Returns:
      true if the click was handled, false otherwise
    • handleDrag

      void handleDrag(org.bukkit.event.inventory.InventoryDragEvent event)
      Handles the drag on the menu.
      Parameters:
      event - event to handle
    • isValidClick

      boolean isValidClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Checks if a given click is valid.
      Parameters:
      event - event to validate
      Returns:
      true if click is valid, false otherwise