Skip to content

Commit 3f84857

Browse files
WouterGritterZECHEESELORD
authored andcommitted
Move comments
(cherry picked from commit 09736b6)
1 parent bb53099 commit 3f84857

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

proxy/src/main/java/com/velocitypowered/proxy/connection/client/AuthSessionHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public void activated() {
100100
return CompletableFuture.completedFuture(null);
101101
}
102102

103-
// Initiate a regular connection and move over to it.
103+
// Check if we can register the connection before instantiating ConnectedPlayer
104104
if (!server.canRegisterConnection(profileEvent.getGameProfile())) {
105105
// ConnectedPlayer#disconnect0 uses its own translateMessage(), which uses the players' PlayerSettings
106106
// to translate the message, but at this stage this wouldn't have been set yet, resulting in
@@ -116,6 +116,7 @@ public void activated() {
116116
return CompletableFuture.completedFuture(null);
117117
}
118118

119+
// Initiate a regular connection and move over to it.
119120
ConnectedPlayer player = new ConnectedPlayer(server, profileEvent.getGameProfile(),
120121
mcConnection, inbound.getVirtualHost().orElse(null), inbound.getRawVirtualHost().orElse(null), onlineMode,
121122
inbound.getHandshakeIntent(), inbound.getIdentifiedKey());

0 commit comments

Comments
 (0)