sendPacket

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

onSuccess

Gets executed when sending succeeds.

onFailure

Gets executed when sending fails.