From 30baee84bd23ae5af7a14807cc37d1c48e56d0dc Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 6 Sep 2018 16:11:44 -0400 Subject: [PATCH] Add the same check to ClientPlaySessionHandler --- .../proxy/connection/client/ClientPlaySessionHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index 3a93f0330..3fd25e848 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -122,12 +122,16 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler { } // If we don't want to handle this packet, just forward it on. - player.getConnectedServer().getMinecraftConnection().write(packet); + if (player.getConnectedServer().hasCompletedJoin()) { + player.getConnectedServer().getMinecraftConnection().write(packet); + } } @Override public void handleUnknown(ByteBuf buf) { - player.getConnectedServer().getMinecraftConnection().write(buf.retain()); + if (player.getConnectedServer().hasCompletedJoin()) { + player.getConnectedServer().getMinecraftConnection().write(buf.retain()); + } } @Override