Record Class ClientClickWindowPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientClickWindowPacket
- All Implemented Interfaces:
ClientPacket
public record ClientClickWindowPacket(int windowId, int stateId, short slot, byte button, @NotNull ClientClickWindowPacket.ClickType clickType, @NotNull List<ClientClickWindowPacket.ChangedSlot> changedSlots, @NotNull ItemStack clickedItem)
extends Record
implements ClientPacket
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final NetworkBuffer.Type
<ClientClickWindowPacket> -
Constructor Summary
ConstructorDescriptionClientClickWindowPacket
(int windowId, int stateId, short slot, byte button, @NotNull ClientClickWindowPacket.ClickType clickType, @NotNull List<ClientClickWindowPacket.ChangedSlot> changedSlots, @NotNull ItemStack clickedItem) Creates an instance of aClientClickWindowPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionbyte
button()
Returns the value of thebutton
record component.@NotNull List
<ClientClickWindowPacket.ChangedSlot> Returns the value of thechangedSlots
record component.@NotNull ItemStack
Returns the value of theclickedItem
record component.@NotNull ClientClickWindowPacket.ClickType
Returns the value of theclickType
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.short
slot()
Returns the value of theslot
record component.int
stateId()
Returns the value of thestateId
record component.final String
toString()
Returns a string representation of this record class.int
windowId()
Returns the value of thewindowId
record component.
-
Field Details
-
MAX_CHANGED_SLOTS
public static final int MAX_CHANGED_SLOTS- See Also:
-
SERIALIZER
-
-
Constructor Details
-
ClientClickWindowPacket
public ClientClickWindowPacket(int windowId, int stateId, short slot, byte button, @NotNull @NotNull ClientClickWindowPacket.ClickType clickType, @NotNull @NotNull List<ClientClickWindowPacket.ChangedSlot> changedSlots, @NotNull @NotNull ItemStack clickedItem) Creates an instance of aClientClickWindowPacket
record class.- Parameters:
windowId
- the value for thewindowId
record componentstateId
- the value for thestateId
record componentslot
- the value for theslot
record componentbutton
- the value for thebutton
record componentclickType
- the value for theclickType
record componentchangedSlots
- the value for thechangedSlots
record componentclickedItem
- the value for theclickedItem
record component
-
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
windowId
public int windowId()Returns the value of thewindowId
record component.- Returns:
- the value of the
windowId
record component
-
stateId
public int stateId()Returns the value of thestateId
record component.- Returns:
- the value of the
stateId
record component
-
slot
public short slot()Returns the value of theslot
record component.- Returns:
- the value of the
slot
record component
-
button
public byte button()Returns the value of thebutton
record component.- Returns:
- the value of the
button
record component
-
clickType
Returns the value of theclickType
record component.- Returns:
- the value of the
clickType
record component
-
changedSlots
Returns the value of thechangedSlots
record component.- Returns:
- the value of the
changedSlots
record component
-
clickedItem
Returns the value of theclickedItem
record component.- Returns:
- the value of the
clickedItem
record component
-