Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-25 15:50:19 +01:00
Deal with potentially nullable player sample entries
Dieser Commit ist enthalten in:
Ursprung
5b75927586
Commit
7d1770d37e
@ -114,7 +114,7 @@ public final class ServerPing {
|
|||||||
if (players != null) {
|
if (players != null) {
|
||||||
builder.onlinePlayers = players.online;
|
builder.onlinePlayers = players.online;
|
||||||
builder.maximumPlayers = players.max;
|
builder.maximumPlayers = players.max;
|
||||||
builder.samplePlayers.addAll(players.sample);
|
builder.samplePlayers.addAll(players.getSample());
|
||||||
} else {
|
} else {
|
||||||
builder.nullOutPlayers = true;
|
builder.nullOutPlayers = true;
|
||||||
}
|
}
|
||||||
@ -354,7 +354,7 @@ public final class ServerPing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<SamplePlayer> getSample() {
|
public List<SamplePlayer> getSample() {
|
||||||
return sample;
|
return sample == null ? ImmutableList.of() : sample;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren