From b3ac24264186372f66e631623dbede7e920df8a7 Mon Sep 17 00:00:00 2001 From: Tux Date: Sun, 9 Feb 2014 14:03:03 -0500 Subject: [PATCH] Add support for fetching hidden players diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index fe0faaec4..fc07b273a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1925,6 +1925,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { server.getServer().getPlayerList().respawn( getHandle(), false ); } } + + @Override + public Set getHiddenPlayers() + { + Set ret = new HashSet(); + for ( UUID u : hiddenEntities.keySet() ) + { + Player p = getServer().getPlayer( u ); + if ( p != null ) + { + ret.add( p ); + } + } + + return java.util.Collections.unmodifiableSet( ret ); + } }; public Player.Spigot spigot() -- 2.25.1