Skip to content

Commit

Permalink
Remove count of left out players, since Minecraft does this on it's own
Browse files Browse the repository at this point in the history
Fixes #52
  • Loading branch information
voruti committed Oct 27, 2024
1 parent 4750fec commit 3a2f492
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,7 @@ public void applyToServerPing(@NonNull final ServerPing.Builder serverPing) {
if (maxListEntries > 0) {
samplePlayers = playerStream
.limit(maxListEntries)
.collect(Collectors.toCollection(ArrayList::new));

final int numberOfLeftOutPlayers = players.size() - maxListEntries;
if (numberOfLeftOutPlayers > 0) {
samplePlayers.add(
new ServerPing.SamplePlayer(
String.format("...and %d more", numberOfLeftOutPlayers),
UUID.randomUUID()
)
);
}
.toList();
} else {
samplePlayers = playerStream.collect(Collectors.toList());
}
Expand Down

0 comments on commit 3a2f492

Please sign in to comment.