Class ServerListener
java.lang.Object
org.geysermc.mcprotocollib.network.event.session.SessionAdapter
org.geysermc.mcprotocollib.protocol.ServerListener
- All Implemented Interfaces:
SessionListener
Handles initial login and status requests for servers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnected(ConnectedEvent event) Called when a session connects.voiddisconnecting(DisconnectingEvent event) Called when a session is about to disconnect.voidpacketReceived(Session session, Packet packet) Called when a session receives a packet.voidpacketSent(Session session, Packet packet) Called when a session sends a packet.Methods inherited from class org.geysermc.mcprotocollib.network.event.session.SessionAdapter
disconnected, packetError, packetSending
-
Constructor Details
-
ServerListener
public ServerListener(org.cloudburstmc.nbt.NbtMap networkCodec)
-
-
Method Details
-
connected
Description copied from interface:SessionListenerCalled when a session connects.- Specified by:
connectedin interfaceSessionListener- Overrides:
connectedin classSessionAdapter- Parameters:
event- Data relating to the event.
-
packetReceived
Description copied from interface:SessionListenerCalled when a session receives a packet.- Specified by:
packetReceivedin interfaceSessionListener- Overrides:
packetReceivedin classSessionAdapterpacket- the packet that was just received.
-
packetSent
Description copied from interface:SessionListenerCalled when a session sends a packet.- Specified by:
packetSentin interfaceSessionListener- Overrides:
packetSentin classSessionAdapterpacket- Packet just sent.
-
disconnecting
Description copied from interface:SessionListenerCalled when a session is about to disconnect.- Specified by:
disconnectingin interfaceSessionListener- Overrides:
disconnectingin classSessionAdapter- Parameters:
event- Data relating to the event.
-