Packet Events
Learn more about the Packet events OneConfig has to offer
SendPacketEvent
SendPacketEvent is (as the name suggests) an event that is fired every time the client sends a packet.
This event also gets the packet that is going to be sent, as a Packet<?>
. You can use code like the code below to do things with it.
This event is cancellable, meaning you can stop the packet from getting into the games code. Be careful with what you cancel!
ReceivePacketEvent
ReceivePacketEvent is (as the name suggests) an event that is fired every time the client receives a packet.
This event also gets the packet that has been received, as a Packet<?>
. You can use code like the code below to do things with it.
This event is Cancel-able, meaning you can stop the packet from getting into the games code. Be careful with what you cancel!
Last updated