Class GUIClickEvent

java.lang.Object
org.bukkit.event.Event
me.eddie.inventoryguiapi.gui.events.GUIEvent
me.eddie.inventoryguiapi.gui.events.GUIClickEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable
Direct Known Subclasses:
GUIBedrockClickEvent, GUIMiscClickEvent, GUIPickupItemEvent, GUIPlaceItemEvent

public abstract class GUIClickEvent extends GUIEvent implements org.bukkit.event.Cancellable
Cancellable event that is fired when a GUIElement has been clicked on but has not yet handled the click
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    GUIClickEvent(GUISession session, org.bukkit.entity.Player viewer, int inventorySlot, GUIElement interactedElement, org.bukkit.event.inventory.InventoryClickEvent bukkitEvent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.event.inventory.InventoryClickEvent
    Get the Bukkit event that caused this event
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    Get the GUIElement interacted with, or null if none was
    int
    Get the slot of the inventory interacted with
    Get the GUISession associated with the click event
    org.bukkit.entity.Player
    Get the viewer who just clicked
    boolean
     
    void
    setCancelled(boolean b)
     

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GUIClickEvent

      public GUIClickEvent(GUISession session, org.bukkit.entity.Player viewer, int inventorySlot, GUIElement interactedElement, org.bukkit.event.inventory.InventoryClickEvent bukkitEvent)
  • Method Details

    • getInventorySlot

      public int getInventorySlot()
      Get the slot of the inventory interacted with
      Returns:
      The slot of the inventory interacted with
    • getInteractedElement

      public GUIElement getInteractedElement()
      Get the GUIElement interacted with, or null if none was
      Returns:
      The GUIElement interacted with, or null if none was
    • getBukkitEvent

      public org.bukkit.event.inventory.InventoryClickEvent getBukkitEvent()
      Get the Bukkit event that caused this event
      Returns:
      The Bukkit event that caused this event
    • getSession

      public GUISession getSession()
      Get the GUISession associated with the click event
      Returns:
      The GUISession
    • getViewer

      public org.bukkit.entity.Player getViewer()
      Get the viewer who just clicked
      Returns:
      The viewer
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean b)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Overrides:
      getHandlers in class GUIEvent
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()