Close #474 - 1.5 ping to 1.6 bungee
This commit is contained in:
parent
5c4ea3c7a0
commit
06e732d8c7
@ -141,6 +141,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void respondToPing()
|
private void respondToPing()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
ServerInfo forced = AbstractReconnectManager.getForcedHost( this );
|
ServerInfo forced = AbstractReconnectManager.getForcedHost( this );
|
||||||
String motd = listener.getMotd();
|
String motd = listener.getMotd();
|
||||||
@ -161,6 +163,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
+ "\00" + response.getCurrentPlayers()
|
+ "\00" + response.getCurrentPlayers()
|
||||||
+ "\00" + response.getMaxPlayers();
|
+ "\00" + response.getMaxPlayers();
|
||||||
disconnect( kickMessage );
|
disconnect( kickMessage );
|
||||||
|
} catch ( Throwable t )
|
||||||
|
{
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -173,7 +179,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
{
|
{
|
||||||
respondToPing();
|
respondToPing();
|
||||||
}
|
}
|
||||||
}, 1000, TimeUnit.MILLISECONDS );
|
}, 500, TimeUnit.MILLISECONDS );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,6 +30,11 @@ public abstract class AbstractReconnectManager implements ReconnectHandler
|
|||||||
|
|
||||||
public static ServerInfo getForcedHost(PendingConnection con)
|
public static ServerInfo getForcedHost(PendingConnection con)
|
||||||
{
|
{
|
||||||
|
if ( con.getVirtualHost() == null )
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
String forced = con.getListener().getForcedHosts().get( con.getVirtualHost().getHostString() );
|
String forced = con.getListener().getForcedHosts().get( con.getVirtualHost().getHostString() );
|
||||||
|
|
||||||
if ( forced == null && con.getListener().isForceDefault() )
|
if ( forced == null && con.getListener().isForceDefault() )
|
||||||
|
Loading…
Reference in New Issue
Block a user