Class ClientIntentionPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.handshake.serverbound.ClientIntentionPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionClientIntentionPacket(int protocolVersion, @NonNull String hostname, int port, @NonNull HandshakeIntent intent) ClientIntentionPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboolean@NonNull String@NonNull HandshakeIntentintgetPort()intinthashCode()booleanGets whether the packet has handling priority.booleanReturns whether the packet is terminal.voidserialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper) @NonNull StringtoString()@NonNull ClientIntentionPacketwithHostname(@NonNull String hostname) @NonNull ClientIntentionPacketwithIntent(@NonNull HandshakeIntent intent) @NonNull ClientIntentionPacketwithPort(int port) @NonNull ClientIntentionPacketwithProtocolVersion(int protocolVersion)
-
Constructor Details
-
ClientIntentionPacket
-
ClientIntentionPacket
public ClientIntentionPacket(int protocolVersion, @NonNull @NonNull String hostname, int port, @NonNull @NonNull HandshakeIntent intent)
-
-
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.
-
isTerminal
public boolean isTerminal()Description copied from interface:PacketReturns whether the packet is terminal. If true, this should be the last packet sent inside a protocol state. Subsequently,Session.setAutoRead(boolean)should be disabled when a terminal packet is received, until the session has switched into a new state and is ready to receive more packets.- Specified by:
isTerminalin interfacePacket- Returns:
- Whether the packet is terminal.
-
getProtocolVersion
public int getProtocolVersion() -
getHostname
-
getPort
public int getPort() -
getIntent
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withProtocolVersion
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHostname
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withPort
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIntent
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-