Interface Message.Packet
- All Superinterfaces:
Message<MessageBuffer>,Message.PacketBase<MessageBuffer>
- Enclosing interface:
Message<T extends MessageBuffer>
Represents a packet message that includes a packet ID.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.geysermc.geyser.api.network.message.Message
Message.Packet, Message.PacketBase<T extends MessageBuffer>, Message.PacketWrapped<T extends MessageBuffer,P>, Message.Simple -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T extends MessageBuffer,P>
Message.PacketWrapped<T, P> Creates a new packet message from the given packet object and direction.static <T extends MessageBuffer,V, P>
MessageFactory<T, Message.PacketWrapped<T, P>> Creates a new packet message from the given substitutor and packet supplier.static <T extends MessageBuffer,P>
MessageFactory<T, Message.PacketWrapped<T, P>> Creates a new packet message from the given packet supplier.
-
Method Details
-
of
Creates a new packet message from the given packet object and direction.- Parameters:
packet- the packet object to create the message from- Returns:
- a new packet message
-
of
static <T extends MessageBuffer,P> MessageFactory<T,Message.PacketWrapped<T, ofP>> (Supplier<P> packetSupplier) Creates a new packet message from the given packet supplier.- Parameters:
packetSupplier- a supplier that provides the packet object to create the message from- Returns:
- a new packet message
-
of
static <T extends MessageBuffer,V, MessageFactory<T,P> Message.PacketWrapped<T, ofP>> (Function<T, V> substitutor, Function<V, P> packetSupplier) Creates a new packet message from the given substitutor and packet supplier.- Parameters:
substitutor- a function that applies to the buffer to get the packet objectpacketSupplier- a function that provides the packet object- Returns:
- a new packet message factory
-