SPIGOT-7772: Include hidden / non-sampled players in player count

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2024-06-22 08:07:02 +10:00
parent 542f38bbd0
commit 97750e6387

View file

@ -110,7 +110,7 @@
+ }
+ }
+
+ ServerPing.ServerPingPlayerSample playerSample = new ServerPing.ServerPingPlayerSample(event.getMaxPlayers(), profiles.size(), (server.hidesOnlinePlayers()) ? Collections.emptyList() : profiles);
+ ServerPing.ServerPingPlayerSample playerSample = new ServerPing.ServerPingPlayerSample(event.getMaxPlayers(), event.getNumPlayers(), (server.hidesOnlinePlayers()) ? Collections.emptyList() : profiles);
+
+ ServerPing ping = new ServerPing(
+ CraftChatMessage.fromString(event.getMotd(), true)[0],