Record Class ClickInput
java.lang.Object
java.lang.Record
com.ultikits.ultitools.ui.chest.ClickInput
@Internal
public record ClickInput(org.bukkit.event.inventory.InventoryAction action, org.bukkit.event.inventory.ClickType click, SlotKind kind, CursorState cursor, boolean slotEmpty, GridSlot slot, int playerSlot, int hotbar)
extends Record
Immutable input;
slotEmpty describes the container, not the screen copy.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.bukkit.event.inventory.InventoryActionThe field for theactionrecord component.private final org.bukkit.event.inventory.ClickTypeThe field for theclickrecord component.private final CursorStateThe field for thecursorrecord component.private final intThe field for thehotbarrecord component.private final SlotKindThe field for thekindrecord component.private final intThe field for theplayerSlotrecord component.private final GridSlotThe field for theslotrecord component.private final booleanThe field for theslotEmptyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClickInput(org.bukkit.event.inventory.InventoryAction action, org.bukkit.event.inventory.ClickType click, SlotKind kind, CursorState cursor, boolean slotEmpty, GridSlot slot, int playerSlot, int hotbar) Creates an instance of aClickInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.event.inventory.InventoryActionaction()Returns the value of theactionrecord component.org.bukkit.event.inventory.ClickTypeclick()Returns the value of theclickrecord component.cursor()Returns the value of thecursorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inthotbar()Returns the value of thehotbarrecord component.kind()Returns the value of thekindrecord component.intReturns the value of theplayerSlotrecord component.slot()Returns the value of theslotrecord component.booleanReturns the value of theslotEmptyrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
action
private final org.bukkit.event.inventory.InventoryAction actionThe field for theactionrecord component. -
click
private final org.bukkit.event.inventory.ClickType clickThe field for theclickrecord component. -
kind
The field for thekindrecord component. -
cursor
The field for thecursorrecord component. -
slotEmpty
private final boolean slotEmptyThe field for theslotEmptyrecord component. -
slot
The field for theslotrecord component. -
playerSlot
private final int playerSlotThe field for theplayerSlotrecord component. -
hotbar
private final int hotbarThe field for thehotbarrecord component.
-
-
Constructor Details
-
ClickInput
public ClickInput(org.bukkit.event.inventory.InventoryAction action, org.bukkit.event.inventory.ClickType click, SlotKind kind, CursorState cursor, boolean slotEmpty, GridSlot slot, int playerSlot, int hotbar) Creates an instance of aClickInputrecord class.- Parameters:
action- the value for theactionrecord componentclick- the value for theclickrecord componentkind- the value for thekindrecord componentcursor- the value for thecursorrecord componentslotEmpty- the value for theslotEmptyrecord componentslot- the value for theslotrecord componentplayerSlot- the value for theplayerSlotrecord componenthotbar- the value for thehotbarrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
action
public org.bukkit.event.inventory.InventoryAction action()Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
click
public org.bukkit.event.inventory.ClickType click()Returns the value of theclickrecord component.- Returns:
- the value of the
clickrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
cursor
Returns the value of thecursorrecord component.- Returns:
- the value of the
cursorrecord component
-
slotEmpty
public boolean slotEmpty()Returns the value of theslotEmptyrecord component.- Returns:
- the value of the
slotEmptyrecord component
-
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
playerSlot
public int playerSlot()Returns the value of theplayerSlotrecord component.- Returns:
- the value of the
playerSlotrecord component
-
hotbar
public int hotbar()Returns the value of thehotbarrecord component.- Returns:
- the value of the
hotbarrecord component
-