Merge pull request #119 from minecrafter/master
Add support for fetching hidden players via Spigot object
This commit is contained in:
commit
a17299c334
|
@ -0,0 +1,30 @@
|
|||
From 40166667a533e1ae2f6da758b14ebe7c17fb5b48 Mon Sep 17 00:00:00 2001
|
||||
From: Tux <write@imaginarycode.com>
|
||||
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<Player> getHiddenPlayers()
|
||||
+ {
|
||||
+ throw new UnsupportedOperationException( "Not supported yet." );
|
||||
+ }
|
||||
}
|
||||
|
||||
Spigot spigot();
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From b3f3233165d3adab94cebcf984d37120a95dd4df Mon Sep 17 00:00:00 2001
|
||||
From: Tux <write@imaginarycode.com>
|
||||
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<Player> getHiddenPlayers()
|
||||
+ {
|
||||
+ return java.util.Collections.unmodifiableSet( new HashSet<Player>( hiddenPlayers.values() ) );
|
||||
+ }
|
||||
};
|
||||
|
||||
public Player.Spigot spigot()
|
||||
--
|
||||
1.7.10.4
|
||||
|
Loading…
Reference in New Issue