Class ClientboundDisconnectPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundDisconnectPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionClientboundDisconnectPacket(@NonNull String reason) ClientboundDisconnectPacket(@NonNull net.kyori.adventure.text.Component reason) ClientboundDisconnectPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboolean@NonNull net.kyori.adventure.text.ComponentinthashCode()booleanGets whether the packet has handling priority.voidserialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper) @NonNull StringtoString()@NonNull ClientboundDisconnectPacketwithReason(@NonNull net.kyori.adventure.text.Component reason) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isTerminal
-
Constructor Details
-
ClientboundDisconnectPacket
-
ClientboundDisconnectPacket
-
ClientboundDisconnectPacket
public ClientboundDisconnectPacket(@NonNull @NonNull net.kyori.adventure.text.Component reason)
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceMinecraftPacket
-
isPriority
public boolean isPriority()Description copied from interface:PacketGets whether the packet has handling priority. If the result is true, the packet will be handled immediately after being decoded.- Specified by:
isPriorityin interfacePacket- Returns:
- Whether the packet has priority.
-
getReason
@NonNull public @NonNull net.kyori.adventure.text.Component getReason() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withReason
public @NonNull ClientboundDisconnectPacket withReason(@NonNull @NonNull net.kyori.adventure.text.Component reason) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-