mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-01 05:57:52 +01:00
Return an empty list instead of null when getting the player sample.
This commit is contained in:
parent
3e7fe52681
commit
2a729cfe2d
@ -241,11 +241,11 @@ public class WrappedServerPing extends AbstractWrapper {
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
if (players == null)
|
||||
return null;
|
||||
return ImmutableList.of();
|
||||
return ImmutableList.copyOf(PROFILE_CONVERT.getSpecific(PLAYERS_PROFILES.get(players)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user