public class PacketSentEvent extends Object implements SessionEvent
| Constructor and Description |
|---|
PacketSentEvent(Session session,
Packet packet)
Creates a new PacketSentEvent instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
call(SessionListener listener)
Calls the event.
|
<T extends Packet> |
getPacket()
Gets the packet involved in this event as the required type.
|
Session |
getSession()
Gets the session involved in this event.
|
public Session getSession()
public <T extends Packet> T getPacket()
T - Type of the packet.IllegalStateException - If the packet's value isn't of the required type.public void call(SessionListener listener)
SessionEventcall in interface SessionEventlistener - Listener to call the event on.Copyright © 2021. All rights reserved.