Record Class ClientboundLoginDisconnectPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.login.ClientboundLoginDisconnectPacket
- All Implemented Interfaces:
Packet<ClientLoginPacketListener>
public record ClientboundLoginDisconnectPacket(Component reason)
extends Record
implements Packet<ClientLoginPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final RegistryOps<JsonElement> private final ComponentThe field for thereasonrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ClientboundLoginDisconnectPacket> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aClientboundLoginDisconnectPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientLoginPacketListener listener) Passes this Packet on to the NetHandler for processing.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
reason
The field for thereasonrecord component. -
OPS
-
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf, ClientboundLoginDisconnectPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundLoginDisconnectPacket
Creates an instance of aClientboundLoginDisconnectPacketrecord class.- Parameters:
reason- the value for thereasonrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientLoginPacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientLoginPacketListener>
-
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 withObjects::equals(Object,Object). -
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-