Record Class ClickContext
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.menu.ClickContext
public record ClickContext(org.bukkit.entity.Player player, org.bukkit.event.inventory.ClickType clickType, AbstractContainerMenu menu, Slot slot, org.bukkit.inventory.ItemStack cursor)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionClickContext(org.bukkit.entity.Player player, org.bukkit.event.inventory.ClickType clickType, AbstractContainerMenu menu, Slot slot, org.bukkit.inventory.ItemStack cursor) Creates an instance of aClickContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.event.inventory.ClickTypeReturns the value of theclickTyperecord component.org.bukkit.inventory.ItemStackcursor()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.menu()Returns the value of themenurecord component.org.bukkit.entity.Playerplayer()Returns the value of theplayerrecord component.slot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
player
public org.bukkit.entity.Player player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
clickType
public org.bukkit.event.inventory.ClickType clickType()Returns the value of theclickTyperecord component.- Returns:
- the value of the
clickTyperecord component
-
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
cursor
public org.bukkit.inventory.ItemStack cursor()Returns the value of thecursorrecord component.- Returns:
- the value of the
cursorrecord component
-