Package org.geysermc.geyser.api.network
Interface Network
public interface Network
Represents the network handler responsible for handling network operations
for a
GeyserConnection.- Since:
- 2.9.2
-
Method Summary
Modifier and TypeMethodDescriptionGets the Java protocol state of the connection.Gets the registered network channels.<T extends MessageBuffer>
voidsend(NetworkChannel channel, Message<T> message, MessageDirection direction, MessageFlag... flags) Sends a message to this connection on the specified channel.
-
Method Details
-
javaState
JavaState javaState()Gets the Java protocol state of the connection.- Returns:
- the Java protocol state
-
registeredChannels
Set<NetworkChannel> registeredChannels()Gets the registered network channels.- Returns:
- the registered network channels
-
send
<T extends MessageBuffer> void send(NetworkChannel channel, Message<T> message, MessageDirection direction, MessageFlag... flags) Sends a message to this connection on the specified channel.- Parameters:
channel- the channel to send the message onmessage- the message to senddirection- the direction of the message (clientbound or serverbound)flags- the message flags to use when sending the message
-