Class SessionAdapter
java.lang.Object
org.geysermc.mcprotocollib.network.event.session.SessionAdapter
- All Implemented Interfaces:
SessionListener
- Direct Known Subclasses:
ClientListener,ServerListener
An adapter for picking session events to listen for.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnected(ConnectedEvent event) Called when a session connects.voiddisconnected(DisconnectedEvent event) Called when a session is disconnected.voiddisconnecting(DisconnectingEvent event) Called when a session is about to disconnect.voidpacketError(PacketErrorEvent event) Called when a session encounters an error while reading or writing packet data.voidpacketReceived(Session session, Packet packet) Called when a session receives a packet.voidpacketSending(PacketSendingEvent event) Called when a session is sending a packet.voidpacketSent(Session session, Packet packet) Called when a session sends a packet.
-
Constructor Details
-
SessionAdapter
public SessionAdapter()
-
-
Method Details
-
packetReceived
Description copied from interface:SessionListenerCalled when a session receives a packet.- Specified by:
packetReceivedin interfaceSessionListenerpacket- the packet that was just received.
-
packetSending
Description copied from interface:SessionListenerCalled when a session is sending a packet.- Specified by:
packetSendingin interfaceSessionListener- Parameters:
event- Data relating to the event.
-
packetSent
Description copied from interface:SessionListenerCalled when a session sends a packet.- Specified by:
packetSentin interfaceSessionListenerpacket- Packet just sent.
-
packetError
Description copied from interface:SessionListenerCalled when a session encounters an error while reading or writing packet data.- Specified by:
packetErrorin interfaceSessionListener- Parameters:
event- Data relating to the event.
-
connected
Description copied from interface:SessionListenerCalled when a session connects.- Specified by:
connectedin interfaceSessionListener- Parameters:
event- Data relating to the event.
-
disconnecting
Description copied from interface:SessionListenerCalled when a session is about to disconnect.- Specified by:
disconnectingin interfaceSessionListener- Parameters:
event- Data relating to the event.
-
disconnected
Description copied from interface:SessionListenerCalled when a session is disconnected.- Specified by:
disconnectedin interfaceSessionListener- Parameters:
event- Data relating to the event.
-