mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 20:59:12 +01:00
[Breaking] Fix player online sample
This commit is contained in:
parent
02619c6132
commit
4040d9f20a
@ -33,10 +33,9 @@ public class ServerPing
|
|||||||
|
|
||||||
private int max;
|
private int max;
|
||||||
private int online;
|
private int online;
|
||||||
|
private PlayerInfo[] sample;
|
||||||
}
|
}
|
||||||
|
|
||||||
private PlayerInfo[] sample;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class PlayerInfo
|
public static class PlayerInfo
|
||||||
|
@ -123,7 +123,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
public void handle(LegacyPing ping) throws Exception
|
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.getGameVersion(), bungee.getProtocolVersion() ),
|
||||||
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount() ), null, listener.getMotd(), null );
|
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount(), null ), listener.getMotd(), null );
|
||||||
legacy = bungee.getPluginManager().callEvent( new ProxyPingEvent( this, legacy ) ).getResponse();
|
legacy = bungee.getPluginManager().callEvent( new ProxyPingEvent( this, legacy ) ).getResponse();
|
||||||
|
|
||||||
String kickMessage = ChatColor.DARK_BLUE
|
String kickMessage = ChatColor.DARK_BLUE
|
||||||
@ -169,8 +169,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
{
|
{
|
||||||
pingBack.done( new ServerPing(
|
pingBack.done( new ServerPing(
|
||||||
new ServerPing.Protocol( bungee.getGameVersion(), bungee.getProtocolVersion() ),
|
new ServerPing.Protocol( bungee.getGameVersion(), bungee.getProtocolVersion() ),
|
||||||
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount() ),
|
new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount(), null ),
|
||||||
null, motd, BungeeCord.getInstance().config.favicon ),
|
motd, BungeeCord.getInstance().config.favicon ),
|
||||||
null );
|
null );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user