3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Deal with potentially nullable player sample entries

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-02-13 13:32:22 -05:00
Ursprung e558b7ca1f
Commit a5350c6822

Datei anzeigen

@ -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<SamplePlayer> getSample() {
return sample;
return sample == null ? ImmutableList.of() : sample;
}
@Override