Interface GuiElement.Action

Enclosing class:
GuiElement

public static interface GuiElement.Action
A functional interface for specifying how clicking on the element should be treated by implementing the onClick(Click) method. The method should return whether the click event should be cancelled or not.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Executed when a player clicks on an element
  • Method Details

    • onClick

      boolean onClick(GuiElement.Click click)
      Executed when a player clicks on an element
      Parameters:
      click - The Click class containing information about the click
      Returns:
      Whether or not the click event should be cancelled