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

    Fields
    Modifier and Type
    Field
    Description
    private final org.bukkit.event.inventory.InventoryAction
    The field for the action record component.
    private final org.bukkit.event.inventory.ClickType
    The field for the click record component.
    private final CursorState
    The field for the cursor record component.
    private final int
    The field for the hotbar record component.
    private final SlotKind
    The field for the kind record component.
    private final int
    The field for the playerSlot record component.
    private final GridSlot
    The field for the slot record component.
    private final boolean
    The field for the slotEmpty record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a ClickInput record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.event.inventory.InventoryAction
    Returns the value of the action record component.
    org.bukkit.event.inventory.ClickType
    Returns the value of the click record component.
    Returns the value of the cursor record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the hotbar record component.
    Returns the value of the kind record component.
    int
    Returns the value of the playerSlot record component.
    Returns the value of the slot record component.
    boolean
    Returns the value of the slotEmpty record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • action

      private final org.bukkit.event.inventory.InventoryAction action
      The field for the action record component.
    • click

      private final org.bukkit.event.inventory.ClickType click
      The field for the click record component.
    • kind

      private final SlotKind kind
      The field for the kind record component.
    • cursor

      private final CursorState cursor
      The field for the cursor record component.
    • slotEmpty

      private final boolean slotEmpty
      The field for the slotEmpty record component.
    • slot

      private final GridSlot slot
      The field for the slot record component.
    • playerSlot

      private final int playerSlot
      The field for the playerSlot record component.
    • hotbar

      private final int hotbar
      The field for the hotbar record 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 a ClickInput record class.
      Parameters:
      action - the value for the action record component
      click - the value for the click record component
      kind - the value for the kind record component
      cursor - the value for the cursor record component
      slotEmpty - the value for the slotEmpty record component
      slot - the value for the slot record component
      playerSlot - the value for the playerSlot record component
      hotbar - the value for the hotbar record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • action

      public org.bukkit.event.inventory.InventoryAction action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • click

      public org.bukkit.event.inventory.ClickType click()
      Returns the value of the click record component.
      Returns:
      the value of the click record component
    • kind

      public SlotKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • cursor

      public CursorState cursor()
      Returns the value of the cursor record component.
      Returns:
      the value of the cursor record component
    • slotEmpty

      public boolean slotEmpty()
      Returns the value of the slotEmpty record component.
      Returns:
      the value of the slotEmpty record component
    • slot

      public GridSlot slot()
      Returns the value of the slot record component.
      Returns:
      the value of the slot record component
    • playerSlot

      public int playerSlot()
      Returns the value of the playerSlot record component.
      Returns:
      the value of the playerSlot record component
    • hotbar

      public int hotbar()
      Returns the value of the hotbar record component.
      Returns:
      the value of the hotbar record component