[Breaking] Fix player online sample
This commit is contained in:
parent
02619c6132
commit
4040d9f20a
@ -33,9 +33,8 @@ 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
|
||||||
|
@ -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