From 95653d8b2dafc42256212a1c4cbbb8873419d664 Mon Sep 17 00:00:00 2001 From: Tux Date: Sun, 9 Feb 2014 14:05:23 -0500 Subject: [PATCH] Add support for fetching hidden players via Spigot object --- ...-support-for-fetching-hidden-players.patch | 30 +++++++++++++++++++ ...-support-for-fetching-hidden-players.patch | 26 ++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 Bukkit-Patches/0024-Add-support-for-fetching-hidden-players.patch create mode 100644 CraftBukkit-Patches/0111-Add-support-for-fetching-hidden-players.patch diff --git a/Bukkit-Patches/0024-Add-support-for-fetching-hidden-players.patch b/Bukkit-Patches/0024-Add-support-for-fetching-hidden-players.patch new file mode 100644 index 0000000000..ed784e8f4a --- /dev/null +++ b/Bukkit-Patches/0024-Add-support-for-fetching-hidden-players.patch @@ -0,0 +1,30 @@ +From 40166667a533e1ae2f6da758b14ebe7c17fb5b48 Mon Sep 17 00:00:00 2001 +From: Tux +Date: Sun, 9 Feb 2014 14:02:11 -0500 +Subject: [PATCH] Add support for fetching hidden players + + +diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java +index 8489bc9..d18ca2d 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -1077,6 +1077,16 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline + { + throw new UnsupportedOperationException( "Not supported yet." ); + } ++ ++ /** ++ * Gets all players hidden with {@link hidePlayer(org.bukkit.entity.Player)}. ++ * ++ * @return a Set with all hidden players ++ */ ++ public java.util.Set getHiddenPlayers() ++ { ++ throw new UnsupportedOperationException( "Not supported yet." ); ++ } + } + + Spigot spigot(); +-- +1.7.10.4 + diff --git a/CraftBukkit-Patches/0111-Add-support-for-fetching-hidden-players.patch b/CraftBukkit-Patches/0111-Add-support-for-fetching-hidden-players.patch new file mode 100644 index 0000000000..e6098c47f9 --- /dev/null +++ b/CraftBukkit-Patches/0111-Add-support-for-fetching-hidden-players.patch @@ -0,0 +1,26 @@ +From b3f3233165d3adab94cebcf984d37120a95dd4df 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 1bb1a8f..84d60c3 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -1300,6 +1300,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + { + return getHandle().locale; + } ++ ++ @Override ++ public Set getHiddenPlayers() ++ { ++ return java.util.Collections.unmodifiableSet( new HashSet( hiddenPlayers.values() ) ); ++ } + }; + + public Player.Spigot spigot() +-- +1.7.10.4 +