From 51a85d372b004b0d167f6e25bfe9e7862b1c3fb3 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 6 Sep 2018 16:09:13 -0400 Subject: [PATCH] Add hasCompletedJoin() check as suggested --- .../proxy/connection/backend/BackendPlaySessionHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java index 8f231105f..968feccfe 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java @@ -102,7 +102,10 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler { connection.getMinecraftConnection().close(); return; } - connection.getPlayer().getConnection().write(buf.retain()); + + if (connection.hasCompletedJoin()) { + connection.getPlayer().getConnection().write(buf.retain()); + } } @Override