Record Class ClickData
java.lang.Object
java.lang.Record
de.placeblock.betterinventories.content.item.ClickData
- Record Components:
player- The Player who clicked.position- The relative position of the slot that got clickedaction- The InventoryAction of the Eventevent- The Event
public record ClickData(org.bukkit.entity.Player player, Vector2d position, org.bukkit.event.inventory.InventoryAction action, org.bukkit.event.inventory.InventoryClickEvent event)
extends Record
The Button receives the ClickData after an Interaction occurs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.event.inventory.InventoryActionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.org.bukkit.event.inventory.InventoryClickEventevent()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.org.bukkit.entity.Playerplayer()Returns the value of theplayerrecord component.position()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClickData
public ClickData(org.bukkit.entity.Player player, Vector2d position, org.bukkit.event.inventory.InventoryAction action, org.bukkit.event.inventory.InventoryClickEvent event) Creates an instance of aClickDatarecord class.
-
-
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
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
action
public org.bukkit.event.inventory.InventoryAction action()Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
event
public org.bukkit.event.inventory.InventoryClickEvent event()Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-