ClickEvent

class ClickEvent<out T : KtInventoryBase>(val inventory: T, event: InventoryClickEvent)

Contains information about a button click event.

Since

2.0.0

Parameters

T

The type of inventory where the click occurred

Constructors

Link copied to clipboard
constructor(inventory: T, event: InventoryClickEvent)

Properties

Link copied to clipboard
val action: @NotNull InventoryAction

The click action performed

Link copied to clipboard
val click: @NotNull ClickType

The click type

Link copied to clipboard
val currentItem: @Nullable ItemStack?

The item currently in the clicked slot

Link copied to clipboard
val cursor: @Nullable ItemStack?

The item on the cursor

Link copied to clipboard

The number of the clicked hotbar button (0-8) or -1 if not a NUMBER_KEY action

Link copied to clipboard

The inventory instance where the click occurred

Link copied to clipboard
val player: @NotNull HumanEntity

The player who clicked

Link copied to clipboard
val slot: Int

The slot number that was clicked

Link copied to clipboard
val slotType: @NotNull InventoryType.SlotType

The type of slot that was clicked

Functions

Link copied to clipboard
fun unsafe(): InventoryClickEvent

Gets the underlying Bukkit inventory click event.