diff --git a/api/src/main/java/com/velocitypowered/api/proxy/server/ServerPing.java b/api/src/main/java/com/velocitypowered/api/proxy/server/ServerPing.java index db3ef1ed5..7049c3c30 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/server/ServerPing.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/server/ServerPing.java @@ -114,7 +114,7 @@ public final class ServerPing { if (players != null) { builder.onlinePlayers = players.online; builder.maximumPlayers = players.max; - builder.samplePlayers.addAll(players.sample); + builder.samplePlayers.addAll(players.getSample()); } else { builder.nullOutPlayers = true; } @@ -367,7 +367,7 @@ public final class ServerPing { } public List getSample() { - return sample; + return sample == null ? ImmutableList.of() : sample; } @Override