From 2a729cfe2d17b180add0b885b4601c14446b5054 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 9 Jan 2014 17:18:34 +0100 Subject: [PATCH] Return an empty list instead of null when getting the player sample. --- .../com/comphenix/protocol/wrappers/WrappedServerPing.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java index a783052e..437b5b5c 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java @@ -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 getPlayers() { if (players == null) - return null; + return ImmutableList.of(); return ImmutableList.copyOf(PROFILE_CONVERT.getSpecific(PLAYERS_PROFILES.get(players))); }