Module net.minestom.server
Record Class PlayerInfoUpdatePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.PlayerInfoUpdatePacket
- All Implemented Interfaces:
ComponentHolder<ServerPacket>
,SendablePacket
,ServerPacket
,ServerPacket.ComponentHolding
,ServerPacket.Play
public record PlayerInfoUpdatePacket(EnumSet<PlayerInfoUpdatePacket.Action> actions, List<PlayerInfoUpdatePacket.Entry> entries)
extends Record
implements ServerPacket.Play, ServerPacket.ComponentHolding
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static final record
static final record
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final NetworkBuffer.Type
<PlayerInfoUpdatePacket> -
Constructor Summary
ConstructorsConstructorDescriptionPlayerInfoUpdatePacket
(EnumSet<PlayerInfoUpdatePacket.Action> actions, List<PlayerInfoUpdatePacket.Entry> entries) Creates an instance of aPlayerInfoUpdatePacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionactions()
Returns the value of theactions
record component.Gets the components held by this object.copyWithOperator
(UnaryOperator<Component> operator) Returns a copy of this object.entries()
Returns the value of theentries
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.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.adventure.ComponentHolder
visitComponents
-
Field Details
-
MAX_ENTRIES
public static final int MAX_ENTRIES- See Also:
-
SERIALIZER
-
-
Constructor Details
-
PlayerInfoUpdatePacket
public PlayerInfoUpdatePacket(PlayerInfoUpdatePacket.Action action, PlayerInfoUpdatePacket.Entry entry) -
PlayerInfoUpdatePacket
public PlayerInfoUpdatePacket(EnumSet<PlayerInfoUpdatePacket.Action> actions, List<PlayerInfoUpdatePacket.Entry> entries) Creates an instance of aPlayerInfoUpdatePacket
record class.- Parameters:
actions
- the value for theactions
record componententries
- the value for theentries
record component
-
-
Method Details
-
components
Description copied from interface:ComponentHolder
Gets the components held by this object.- Specified by:
components
in interfaceComponentHolder<ServerPacket>
- Returns:
- the components
-
copyWithOperator
Description copied from interface:ComponentHolder
Returns a copy of this object. For each component this object holds, the operator is applied to the copy before returning.- Specified by:
copyWithOperator
in interfaceComponentHolder<ServerPacket>
- Parameters:
operator
- the operator- Returns:
- the copy
-
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)
. -
actions
Returns the value of theactions
record component.- Returns:
- the value of the
actions
record component
-
entries
Returns the value of theentries
record component.- Returns:
- the value of the
entries
record component
-