send Packet
inline fun ClientCommonPacketListenerImpl.sendPacket(packet: LegacyPacket, onSuccess: () -> Unit = {}, onFailure: () -> Unit = {})
Sends the packet.
Make sure to check if ViaFabricPlus is loaded before using this or constructing the packet.
Keep in mind, the packet won't be caught by the packet event.
Parameters
on Success
Gets executed when sending succeeds.
on Failure
Gets executed when sending fails.