Class PacketDefinition<T extends Packet>
java.lang.Object
org.geysermc.mcprotocollib.network.codec.PacketDefinition<T>
- Type Parameters:
T- the packet type
-
Constructor Summary
ConstructorsConstructorDescriptionPacketDefinition(int id, Class<T> packetClass, PacketSerializer<T> serializer) -
Method Summary
Modifier and TypeMethodDescriptionintgetId()Returns the id of the packet.Returns the class of the packet.Returns thePacketSerializerof the packet.newInstance(io.netty.buffer.ByteBuf buf, Session session)
-
Constructor Details
-
PacketDefinition
-
-
Method Details
-
getId
public int getId()Returns the id of the packet.- Returns:
- the id of the packet
-
getPacketClass
-
getSerializer
Returns thePacketSerializerof the packet.- Returns:
- the packet serializer of the packet
-
newInstance
-