Archiviert
13
0

Return an empty list instead of null when getting the player sample.

Dieser Commit ist enthalten in:
Minecrell 2014-01-09 17:18:34 +01:00
Ursprung 3e7fe52681
Commit 2a729cfe2d

Datei anzeigen

@ -241,11 +241,11 @@ public class WrappedServerPing extends AbstractWrapper {
/** /**
* Retrieve a copy of all the logged in players. * Retrieve a copy of all the logged in players.
* @return Logged in players or NULL if the player count has been hidden via {@link #setPlayersVisible(boolean)}. * @return Logged in players or an empty list if no player names will be displayed.
*/ */
public ImmutableList<WrappedGameProfile> getPlayers() { public ImmutableList<WrappedGameProfile> getPlayers() {
if (players == null) if (players == null)
return null; return ImmutableList.of();
return ImmutableList.copyOf(PROFILE_CONVERT.getSpecific(PLAYERS_PROFILES.get(players))); return ImmutableList.copyOf(PROFILE_CONVERT.getSpecific(PLAYERS_PROFILES.get(players)));
} }