Dont remove from server if not connected to one.

This commit is contained in:
md_5 2013-01-24 14:03:00 +11:00
parent ec35482102
commit 8f32374cda

View File

@ -152,12 +152,12 @@ public class UserConnection extends GenericConnection implements ProxiedPlayer
private void destroySelf(String reason)
{
server.getInfo().removePlayer(this);
ProxyServer.getInstance().getPlayers().remove(this);
disconnect(reason);
if (server != null)
{
server.getInfo().removePlayer(this);
server.disconnect("Quitting");
ProxyServer.getInstance().getReconnectHandler().setServer(this);
}