Record Class GUIItemListener
java.lang.Object
java.lang.Record
de.placeblock.betterinventories.gui.listener.GUIItemListener
- Record Components:
gui- The GUI this listener belongs to
- All Implemented Interfaces:
org.bukkit.event.Listener
Listener for GUIs that handles item interactions
-
Constructor Summary
ConstructorsConstructorDescriptionGUIItemListener(GUI gui) Creates an instance of aGUIItemListenerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchRemove(org.bukkit.event.Cancellable event, GUISection section, Vector2d position) Dispatches a remove actionfinal booleanIndicates whether some other object is "equal to" this one.gui()Returns the value of theguirecord component.final inthashCode()Returns a hash code value for this object.voidonInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event) Called by Bukkit when Player clicks an InventoryvoidonInventoryDrag(org.bukkit.event.inventory.InventoryDragEvent event) Called by Bukkit when Player drags an Inventoryfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GUIItemListener
Creates an instance of aGUIItemListenerrecord class.- Parameters:
gui- the value for theguirecord component
-
-
Method Details
-
onInventoryClick
public void onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event) Called by Bukkit when Player clicks an Inventory- Parameters:
event- The Event
-
dispatchRemove
public void dispatchRemove(org.bukkit.event.Cancellable event, GUISection section, Vector2d position) Dispatches a remove action- Parameters:
event- The eventsection- The sectionposition- The position
-
onInventoryDrag
public void onInventoryDrag(org.bukkit.event.inventory.InventoryDragEvent event) Called by Bukkit when Player drags an Inventory- Parameters:
event- The Event
-
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). -
gui
Returns the value of theguirecord component.- Returns:
- the value of the
guirecord component
-