Skip to content

Commit

Permalink
Fix players would appear twice on server list
Browse files Browse the repository at this point in the history
  • Loading branch information
C0D3-M4513R committed Jul 21, 2023
1 parent 4917c45 commit a41162e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public EventTask onServerPing(final ProxyPingEvent event) {
samplePlayers = playerStream.collect(Collectors.toList());
}
final ServerPing.Builder ping = serverPing.asBuilder()
.clearSamplePlayers()
.samplePlayers(samplePlayers.toArray(new ServerPing.SamplePlayer[0]));
if (config.setMaxPlayers()) ping.maximumPlayers(this.server.getConfiguration().getShowMaxPlayers());
if (config.setOnlinePlayers()) ping.onlinePlayers(players.size());
Expand Down

0 comments on commit a41162e

Please sign in to comment.