Record Class AdvancementsPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.AdvancementsPacket
- All Implemented Interfaces:
ComponentHolder<ServerPacket>
,SendablePacket
,ServerPacket
,ServerPacket.ComponentHolding
,ServerPacket.Play
public record AdvancementsPacket(boolean reset, @NotNull List<AdvancementsPacket.AdvancementMapping> advancementMappings, @NotNull List<String> identifiersToRemove, @NotNull List<AdvancementsPacket.ProgressMapping> progressMappings)
extends Record
implements ServerPacket.Play, ServerPacket.ComponentHolding
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
AdvancementMapping maps the namespaced ID to the Advancement.static final record
static final record
static final record
static final record
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
Modifier and TypeFieldDescriptionstatic final int
static final NetworkBuffer.Type
<AdvancementsPacket> -
Constructor Summary
ConstructorDescriptionAdvancementsPacket
(boolean reset, @NotNull List<AdvancementsPacket.AdvancementMapping> advancementMappings, @NotNull List<String> identifiersToRemove, @NotNull List<AdvancementsPacket.ProgressMapping> progressMappings) Creates an instance of aAdvancementsPacket
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull List
<AdvancementsPacket.AdvancementMapping> Returns the value of theadvancementMappings
record component.@NotNull Collection
<Component> Gets the components held by this object.@NotNull ServerPacket
copyWithOperator
(@NotNull UnaryOperator<Component> operator) Returns a copy of this object.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theidentifiersToRemove
record component.@NotNull List
<AdvancementsPacket.ProgressMapping> Returns the value of theprogressMappings
record component.boolean
reset()
Returns the value of thereset
record component.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_ADVANCEMENTS
public static final int MAX_ADVANCEMENTS- See Also:
-
SERIALIZER
-
-
Constructor Details
-
AdvancementsPacket
public AdvancementsPacket(boolean reset, @NotNull @NotNull List<AdvancementsPacket.AdvancementMapping> advancementMappings, @NotNull @NotNull List<String> identifiersToRemove, @NotNull @NotNull List<AdvancementsPacket.ProgressMapping> progressMappings) Creates an instance of aAdvancementsPacket
record class.- Parameters:
reset
- the value for thereset
record componentadvancementMappings
- the value for theadvancementMappings
record componentidentifiersToRemove
- the value for theidentifiersToRemove
record componentprogressMappings
- the value for theprogressMappings
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
@NotNull public @NotNull ServerPacket copyWithOperator(@NotNull @NotNull UnaryOperator<Component> operator) 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
reset
public boolean reset()Returns the value of thereset
record component.- Returns:
- the value of the
reset
record component
-
advancementMappings
Returns the value of theadvancementMappings
record component.- Returns:
- the value of the
advancementMappings
record component
-
identifiersToRemove
Returns the value of theidentifiersToRemove
record component.- Returns:
- the value of the
identifiersToRemove
record component
-
progressMappings
Returns the value of theprogressMappings
record component.- Returns:
- the value of the
progressMappings
record component
-