Do not allow connections till JoinGame is received.
This commit is contained in:
@@ -481,7 +481,8 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
private Optional<ConnectionRequestBuilder.Status> checkServer(RegisteredServer server) {
|
private Optional<ConnectionRequestBuilder.Status> checkServer(RegisteredServer server) {
|
||||||
Preconditions
|
Preconditions
|
||||||
.checkState(server instanceof VelocityRegisteredServer, "Not a valid Velocity server.");
|
.checkState(server instanceof VelocityRegisteredServer, "Not a valid Velocity server.");
|
||||||
if (connectionInFlight != null) {
|
if (connectionInFlight != null || (connectedServer != null
|
||||||
|
&& !connectedServer.hasCompletedJoin())) {
|
||||||
return Optional.of(ConnectionRequestBuilder.Status.CONNECTION_IN_PROGRESS);
|
return Optional.of(ConnectionRequestBuilder.Status.CONNECTION_IN_PROGRESS);
|
||||||
}
|
}
|
||||||
if (connectedServer != null && connectedServer.getServer().equals(server)) {
|
if (connectedServer != null && connectedServer.getServer().equals(server)) {
|
||||||
|
Reference in New Issue
Block a user