Interface ClickListener

All Known Implementing Classes:
ClickListener.Proxy, ClickListener.Silent

public interface ClickListener
Listens for clicks on items
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Wraps an existing ClickListener instance, where you may optionally override its listener methods.
    static class 
    An implementation of ClickListener that does effectively nothing
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onClick(Player player, boolean leftClick, boolean shiftClick)
    Gets called whenever a player clicked on an item in the GUI
    default void
    onNumClick(Player player, int number)
    Gets called when a player clicks on a number on his keyboard while hovering over item.
  • Method Details

    • onClick

      void onClick(Player player, boolean leftClick, boolean shiftClick)
      Gets called whenever a player clicked on an item in the GUI
      Parameters:
      player - The player who clicked
      leftClick - If it was a left or right click
      shiftClick - If he pressed shift while clicking on it
    • onNumClick

      default void onNumClick(Player player, int number)
      Gets called when a player clicks on a number on his keyboard while hovering over item.
      Parameters:
      player - The player who clicked
      number - The number clicked on the keyboard. Ranges from 1 to 9