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
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
ConstructorsConstructorDescriptionGUIClickEvent(GUISession session, org.bukkit.entity.Player viewer, int inventorySlot, GUIElement interactedElement, org.bukkit.event.inventory.InventoryClickEvent bukkitEvent) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.event.inventory.InventoryClickEventGet the Bukkit event that caused this eventstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListGet the GUIElement interacted with, or null if none wasintGet the slot of the inventory interacted withGet the GUISession associated with the click eventorg.bukkit.entity.PlayerGet the viewer who just clickedbooleanvoidsetCancelled(boolean b) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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
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
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:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean b) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Overrides:
getHandlersin classGUIEvent
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-