GuiClickEvent

class GuiClickEvent(val player: Player, val slot: Int, val event: InventoryClickEvent, val button: GuiButton) : EventCustom

Represents an event triggered when a button within a GUI is clicked by a player.

This event is fired when a player clicks a button in the GUI. It contains information about the player who clicked, the slot where the button was located, the original InventoryClickEvent, and the GuiButton that was clicked.

Parameters

player

The player who clicked the button.

slot

The slot in the inventory where the button is located.

event

The original InventoryClickEvent that triggered this event.

button

The GuiButton that was clicked by the player.

Constructors

Link copied to clipboard
constructor(player: Player, slot: Int, event: InventoryClickEvent, button: GuiButton)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val event: InventoryClickEvent
Link copied to clipboard
val player: Player
Link copied to clipboard
val slot: Int

Functions

Link copied to clipboard
@NotNull
open fun getEventName(): String
Link copied to clipboard
open override fun getHandlers(): HandlerList

Returns the HandlerList associated with this event.

Link copied to clipboard
fun <T> getMeta(key: String): T?

Retrieves the value of the metadata for a specific key.

Link copied to clipboard

Checks if a metadata key exists.

Link copied to clipboard
Link copied to clipboard

Returns the set of all metadata keys.

Link copied to clipboard

Removes the metadata associated with a specific key.

Link copied to clipboard
fun <T> setMeta(key: String, value: T): EventCustom

Sets a value for the metadata with a specific key.