Handle when user gets kicked midway through login to other server
This commit is contained in:
parent
6ae5feee60
commit
cfd10f5714
@ -95,6 +95,13 @@ public class ServerConnector extends PacketHandler
|
|||||||
user.getServer().disconnect( "Quitting" );
|
user.getServer().disconnect( "Quitting" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Fix this?
|
||||||
|
if ( !user.ch.isActive() )
|
||||||
|
{
|
||||||
|
server.disconnect( "Quitting" );
|
||||||
|
throw new IllegalStateException( "No client connected for pending server!" );
|
||||||
|
}
|
||||||
|
|
||||||
// Add to new server
|
// Add to new server
|
||||||
// TODO: Move this to the connected() method of DownstreamBridge
|
// TODO: Move this to the connected() method of DownstreamBridge
|
||||||
target.addPlayer( user );
|
target.addPlayer( user );
|
||||||
|
@ -13,7 +13,6 @@ import net.md_5.bungee.Util;
|
|||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.connection.Server;
|
|
||||||
import net.md_5.bungee.api.event.ChatEvent;
|
import net.md_5.bungee.api.event.ChatEvent;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
import net.md_5.bungee.packet.Packet0KeepAlive;
|
import net.md_5.bungee.packet.Packet0KeepAlive;
|
||||||
@ -44,8 +43,9 @@ public class DownstreamBridge extends PacketHandler
|
|||||||
server.getInfo().removePlayer( con );
|
server.getInfo().removePlayer( con );
|
||||||
bungee.getReconnectHandler().setServer( con );
|
bungee.getReconnectHandler().setServer( con );
|
||||||
|
|
||||||
if (!server.isObsolete()){
|
if ( !server.isObsolete() )
|
||||||
con.disconnect( "[Proxy] Lost connection to server D:" );
|
{
|
||||||
|
con.disconnect( "[Proxy] Lost connection to server D:" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user