Skip to content

Commit

Permalink
fix(client): check if Minecraft connection is null only in 1.20.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed Dec 4, 2024
1 parent 34bb353 commit 448f82b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ public ModServerConnection(@NotNull BaseVoiceClient voiceClient,

@Override
public void sendPacket(@NotNull Packet<?> packet, boolean checkUdpConnection) {
if (!connection.isConnected() || Minecraft.getInstance().getConnection() == null) return;
if (!connection.isConnected()) return;
//#if MC>=12004
//$$ if (Minecraft.getInstance().getConnection() == null) return;
//#endif

if (checkUdpConnection && !voiceClient.getUdpClientManager().isConnected())
return;
Expand Down

0 comments on commit 448f82b

Please sign in to comment.