Record Class Click.HotbarSwap
java.lang.Object
java.lang.Record
net.minestom.server.inventory.click.Click.HotbarSwap
- All Implemented Interfaces:
Click
- Enclosing interface:
Click
-
Nested Class Summary
Nested classes/interfaces inherited from interface Click
Click.Double, Click.Drag, Click.DropCursor, Click.DropSlot, Click.HotbarSwap, Click.Left, Click.LeftDrag, Click.LeftDropCursor, Click.LeftShift, Click.Middle, Click.MiddleDrag, Click.MiddleDropCursor, Click.OffhandSwap, Click.Right, Click.RightDrag, Click.RightDropCursor, Click.RightShift, Click.Window -
Constructor Summary
ConstructorsConstructorDescriptionHotbarSwap(int hotbarSlot, int slot) Creates an instance of aHotbarSwaprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thehotbarSlotrecord component.intslot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HotbarSwap
public HotbarSwap(int hotbarSlot, int slot) Creates an instance of aHotbarSwaprecord class.- Parameters:
hotbarSlot- the value for thehotbarSlotrecord componentslot- the value for theslotrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
hotbarSlot
public int hotbarSlot()Returns the value of thehotbarSlotrecord component.- Returns:
- the value of the
hotbarSlotrecord component
-
slot
-