From 4040d9f20a5fbc5fac2147379a334496818ed37f Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 1 Nov 2013 22:00:46 +1100 Subject: [PATCH] [Breaking] Fix player online sample --- api/src/main/java/net/md_5/bungee/api/ServerPing.java | 3 +-- .../java/net/md_5/bungee/connection/InitialHandler.java | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/net/md_5/bungee/api/ServerPing.java b/api/src/main/java/net/md_5/bungee/api/ServerPing.java index efa0f339..550a07bc 100644 --- a/api/src/main/java/net/md_5/bungee/api/ServerPing.java +++ b/api/src/main/java/net/md_5/bungee/api/ServerPing.java @@ -33,10 +33,9 @@ public class ServerPing private int max; private int online; + private PlayerInfo[] sample; } - private PlayerInfo[] sample; - @Data @AllArgsConstructor public static class PlayerInfo diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index 0d3e496e..28edd888 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -123,7 +123,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection public void handle(LegacyPing ping) throws Exception { 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(); String kickMessage = ChatColor.DARK_BLUE @@ -169,8 +169,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection { pingBack.done( new ServerPing( new ServerPing.Protocol( bungee.getGameVersion(), bungee.getProtocolVersion() ), - new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount() ), - null, motd, BungeeCord.getInstance().config.favicon ), + new ServerPing.Players( listener.getMaxPlayers(), bungee.getOnlineCount(), null ), + motd, BungeeCord.getInstance().config.favicon ), null ); }