Add BungeeCord to the outdated ping message.

This commit is contained in:
md_5 2014-08-31 18:23:45 +10:00
parent 26521cf2ff
commit c822c48fef

View File

@ -132,7 +132,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public void handle(LegacyPing ping) throws Exception
{
ServerPing legacy = new ServerPing( new ServerPing.Protocol( bungee.getGameVersion(), bungee.getProtocolVersion() ),
ServerPing legacy = new ServerPing( new ServerPing.Protocol( bungee.getName() + " " + bungee.getGameVersion(), bungee.getProtocolVersion() ),
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount(), null ), listener.getMotd(), (Favicon) null );
legacy = bungee.getPluginManager().callEvent( new ProxyPingEvent( this, legacy ) ).getResponse();
@ -181,7 +181,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
int protocol = ( Protocol.supportedVersions.contains( handshake.getProtocolVersion() ) ) ? handshake.getProtocolVersion() : bungee.getProtocolVersion();
pingBack.done( new ServerPing(
new ServerPing.Protocol( bungee.getGameVersion(), protocol ),
new ServerPing.Protocol( bungee.getName() + " " + bungee.getGameVersion(), protocol ),
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount(), null ),
motd, BungeeCord.getInstance().config.getFaviconObject() ),
null );