3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 19:40:07 +01:00

Add support for fetching hidden players via Spigot object

Dieser Commit ist enthalten in:
Tux 2014-02-09 14:05:23 -05:00
Ursprung ee9d8c7590
Commit 95653d8b2d
2 geänderte Dateien mit 56 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -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

Datei anzeigen

@ -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