Correct kick handling

This commit is contained in:
Adrian Bergqvist 2023-11-30 00:39:04 +01:00
parent 503cc52dba
commit 692e7c9e79
No known key found for this signature in database
GPG Key ID: FAE7D8EDE225E686

View File

@ -58,22 +58,6 @@ public class ForgeLoginSessionHandler implements MinecraftSessionHandler {
@Override
public void disconnected() {
//Same as default just not safe.
if (!serverConnection.getPlayer().getPhase().consideredComplete()) {
if (server.getConfiguration().getPlayerInfoForwardingMode() == PlayerInfoForwarding.LEGACY) {
serverConnection.getPlayer().handleConnectionException(serverConnection.getServer(),
new QuietRuntimeException("The connection to the remote server was unexpectedly closed.\n"
+ "This is usually because the remote server does not have BungeeCord IP forwarding "
+ "correctly enabled.\nSee https://velocitypowered.com/wiki/users/forwarding/ "
+ "for instructions on how to configure player info forwarding correctly."),
false);
} else {
serverConnection.getPlayer().handleConnectionException(serverConnection.getServer(),
new QuietRuntimeException("The connection to the remote server was unexpectedly closed."),
false);
}
return;
}
original.disconnected();
}