From 4b5664ec91e9518ebf01754ca04a066179e61665 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Fri, 14 Dec 2018 15:09:52 -0500 Subject: [PATCH] Remove redundant check. --- .../proxy/connection/client/LoginSessionHandler.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java index f8e5ff630..d8ebb72e4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java @@ -1,9 +1,9 @@ package com.velocitypowered.proxy.connection.client; +import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_13; import static com.velocitypowered.proxy.VelocityServer.GSON; import static com.velocitypowered.proxy.connection.VelocityConstants.EMPTY_BYTE_ARRAY; import static com.velocitypowered.proxy.connection.VelocityConstants.VELOCITY_IP_FORWARDING_CHANNEL; -import static com.velocitypowered.api.network.ProtocolVersion.*; import com.google.common.base.Preconditions; import com.google.common.net.UrlEscapers; @@ -80,12 +80,6 @@ public class LoginSessionHandler implements MinecraftSessionHandler { inbound.closeWith(Disconnect.create(VelocityMessages.INVALID_USERNAME)); return true; } - } else { - // Offline mode accepts any username, as long as we don't exceed 16 characters. - if (packet.getUsername().length() > 16) { - inbound.closeWith(Disconnect.create(VelocityMessages.INVALID_USERNAME)); - return true; - } } this.login = packet;