From 2f2e2cc28553162447e691aef83fb6f6c4661b9f Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Sun, 30 May 2021 21:36:25 -0400 Subject: [PATCH] Only upload the skin on Floodgate --- .../connector/network/session/GeyserSession.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java index b30b181b6..1bf2c316b 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java @@ -732,6 +732,8 @@ public class GeyserSession implements CommandSender { address = handshakePacket.getHostname(); } + System.out.println((address + addressSuffix).getBytes(StandardCharsets.UTF_8).length); + event.setPacket(new HandshakePacket( handshakePacket.getProtocolVersion(), address + addressSuffix, @@ -802,9 +804,11 @@ public class GeyserSession implements CommandSender { SkinManager.handleBedrockSkin(playerEntity, clientData); } - // We'll send the skin upload a bit after the handshake packet (aka this packet), - // because otherwise the global server returns the data too fast. - getAuthData().upload(connector); + if (remoteAuthType == AuthType.FLOODGATE) { + // We'll send the skin upload a bit after the handshake packet (aka this packet), + // because otherwise the global server returns the data too fast. + getAuthData().upload(connector); + } } PacketTranslatorRegistry.JAVA_TRANSLATOR.translate(event.getPacket().getClass(), event.getPacket(), GeyserSession.this);