geforkt von Mirrors/Velocity
Remove redundant check.
Dieser Commit ist enthalten in:
Ursprung
2884c2ea90
Commit
4b5664ec91
@ -1,9 +1,9 @@
|
|||||||
package com.velocitypowered.proxy.connection.client;
|
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.VelocityServer.GSON;
|
||||||
import static com.velocitypowered.proxy.connection.VelocityConstants.EMPTY_BYTE_ARRAY;
|
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.proxy.connection.VelocityConstants.VELOCITY_IP_FORWARDING_CHANNEL;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.*;
|
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.net.UrlEscapers;
|
import com.google.common.net.UrlEscapers;
|
||||||
@ -80,12 +80,6 @@ public class LoginSessionHandler implements MinecraftSessionHandler {
|
|||||||
inbound.closeWith(Disconnect.create(VelocityMessages.INVALID_USERNAME));
|
inbound.closeWith(Disconnect.create(VelocityMessages.INVALID_USERNAME));
|
||||||
return true;
|
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;
|
this.login = packet;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren