From 3a2f492257af5f95f7c0e1a0fe2eecaa2b760b6d Mon Sep 17 00:00:00 2001 From: voruti <45130096+voruti@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:29:12 +0100 Subject: [PATCH] Remove count of left out players, since Minecraft does this on it's own Fixes #52 --- .../PlayerListServerPingProcessor.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/voruti/velocityplayerlistquery/service/serverpingprocessor/PlayerListServerPingProcessor.java b/src/main/java/voruti/velocityplayerlistquery/service/serverpingprocessor/PlayerListServerPingProcessor.java index 6a3a1ca..0a9ff16 100644 --- a/src/main/java/voruti/velocityplayerlistquery/service/serverpingprocessor/PlayerListServerPingProcessor.java +++ b/src/main/java/voruti/velocityplayerlistquery/service/serverpingprocessor/PlayerListServerPingProcessor.java @@ -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()); }