fix: update voicechat version (i didn't test it i hope it doesn't break)

This commit is contained in:
ChomeNS
2025-09-15 18:30:54 +07:00
parent 7991ad6c49
commit efb3c60abc
2 changed files with 16 additions and 15 deletions

View File

@@ -1 +1 @@
3658
3659

View File

@@ -61,7 +61,7 @@ public class VoiceChatPlugin implements Listener, Runnable {
bot.session.send(new ServerboundCustomPayloadPacket(
Key.key("voicechat:request_secret"),
new FriendlyByteBuf(Unpooled.buffer()).writeInt(18).array()
new FriendlyByteBuf(Unpooled.buffer()).writeInt(20).array()
));
bot.session.send(new ServerboundCustomPayloadPacket(
@@ -126,20 +126,21 @@ public class VoiceChatPlugin implements Listener, Runnable {
if (message == null) continue;
if (message.packet instanceof final PingPacket pingPacket)
sendToServer(new NetworkMessage(pingPacket));
else if (message.packet instanceof KeepAlivePacket)
sendToServer(new NetworkMessage(new KeepAlivePacket()));
else if (message.packet instanceof AuthenticateAckPacket) {
sendToServer(new NetworkMessage(new ConnectionCheckPacket()));
switch (message.packet) {
case final PingPacket pingPacket -> sendToServer(new NetworkMessage(pingPacket));
case final KeepAlivePacket ignoredKeepAlivePacket -> sendToServer(new NetworkMessage(new KeepAlivePacket()));
case final AuthenticateAckPacket ignoredAuthenticateAckPacket -> {
sendToServer(new NetworkMessage(new ConnectionCheckPacket()));
bot.logger.log(
LogType.SIMPLE_VOICE_CHAT,
Component.translatable(
I18nUtilities.get("voicechat.connected"),
Component.text(socketAddress.toString())
)
);
bot.logger.log(
LogType.SIMPLE_VOICE_CHAT,
Component.translatable(
I18nUtilities.get("voicechat.connected"),
Component.text(socketAddress.toString())
)
);
}
default -> {}
}
} catch (final Exception e) {
if (running) bot.logger.error(e);