Record Class TabCompletePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.TabCompletePacket
- All Implemented Interfaces:
ComponentHolder<ServerPacket>
,SendablePacket
,ServerPacket
,ServerPacket.ComponentHolding
,ServerPacket.Play
public record TabCompletePacket(int transactionId, int start, int length, @NotNull List<TabCompletePacket.Match> matches)
extends Record
implements ServerPacket.Play, ServerPacket.ComponentHolding
-
Nested Class Summary
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
<TabCompletePacket> -
Constructor Summary
ConstructorDescriptionTabCompletePacket
(int transactionId, int start, int length, @NotNull List<TabCompletePacket.Match> matches) Creates an instance of aTabCompletePacket
record class. -
Method Summary
Modifier and TypeMethodDescription@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.int
length()
Returns the value of thelength
record component.@NotNull List
<TabCompletePacket.Match> matches()
Returns the value of thematches
record component.int
start()
Returns the value of thestart
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thetransactionId
record component.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
-
TabCompletePacket
public TabCompletePacket(int transactionId, int start, int length, @NotNull @NotNull List<TabCompletePacket.Match> matches) Creates an instance of aTabCompletePacket
record class.- Parameters:
transactionId
- the value for thetransactionId
record componentstart
- the value for thestart
record componentlength
- the value for thelength
record componentmatches
- the value for thematches
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 '=='. -
transactionId
public int transactionId()Returns the value of thetransactionId
record component.- Returns:
- the value of the
transactionId
record component
-
start
public int start()Returns the value of thestart
record component.- Returns:
- the value of the
start
record component
-
length
public int length()Returns the value of thelength
record component.- Returns:
- the value of the
length
record component
-
matches
Returns the value of thematches
record component.- Returns:
- the value of the
matches
record component
-