Class PacketStateCodec
java.lang.Object
org.geysermc.mcprotocollib.network.packet.PacketProtocol
org.geysermc.mcprotocollib.protocol.codec.PacketStateCodec
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PacketStateCodec.Builderbuilder()Creates a newPacketCodecHelperthat can be used for each session.Gets the packet header of this protocol.Gets the prefix used when locating SRV records for this protocol.voidnewClientSession(Session session, boolean transferring) Called when a client session is created with this protocol.voidnewServerSession(Server server, Session session) Called when a server session is created with this protocol.Methods inherited from class org.geysermc.mcprotocollib.network.packet.PacketProtocol
clearPackets, createClientboundPacket, createServerboundPacket, getClientboundClass, getClientboundDefinition, getClientboundId, getClientboundId, getServerboundClass, getServerboundDefinition, getServerboundId, getServerboundId, register, register, registerClientbound, registerClientbound, registerServerbound, registerServerbound
-
Constructor Details
-
PacketStateCodec
public PacketStateCodec()
-
-
Method Details
-
builder
-
getSRVRecordPrefix
Description copied from class:PacketProtocolGets the prefix used when locating SRV records for this protocol.- Specified by:
getSRVRecordPrefixin classPacketProtocol- Returns:
- The protocol's SRV record prefix.
-
getPacketHeader
Description copied from class:PacketProtocolGets the packet header of this protocol.- Specified by:
getPacketHeaderin classPacketProtocol- Returns:
- The protocol's packet header.
-
createHelper
Description copied from class:PacketProtocolCreates a newPacketCodecHelperthat can be used for each session.- Specified by:
createHelperin classPacketProtocol- Returns:
- A new
PacketCodecHelper.
-
newClientSession
Description copied from class:PacketProtocolCalled when a client session is created with this protocol.- Specified by:
newClientSessionin classPacketProtocol- Parameters:
session- The created session.transferring- If the client is being transferred between servers.
-
newServerSession
Description copied from class:PacketProtocolCalled when a server session is created with this protocol.- Specified by:
newServerSessionin classPacketProtocol- Parameters:
server- The server that the session belongs to.session- The created session.
-