var version = Java.type("net.ccbluex.liquidbounce.injection.backend.Backend").MINECRAFT_VERSION
var sendPacket;
if (version == "1.8.9") {
sendPacket = function (packet) {
try {
imc.getNetHandler().addToSendQueue(packet)
} catch (error) {
mc.getNetHandler().addToSendQueue(packet)
}
}
} else {
sendPacket = function (packet) {
try {
mc.netHandler.networkManager.sendPacket(packet)
} catch (error) {
imc.getNetHandler().addToSendQueue(packet)
}
}
}
module.on("packet", function (event) {
var packet = event.packet
});