summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Cowan <agentme49@gmail.com>2017-11-23 17:09:29 -0800
committermd_5 <git@md-5.net>2017-12-05 09:33:45 +1100
commitd41ccca23deb0a9d2ae4f151ab4f8be87b17797c (patch)
treed71a57ef15ad735c2d17191b3d09d24770ec48a3
parent69e52f64f93ded7398e429c94cc414399584f655 (diff)
downloadbukkit-d41ccca23deb0a9d2ae4f151ab4f8be87b17797c.tar
bukkit-d41ccca23deb0a9d2ae4f151ab4f8be87b17797c.tar.gz
bukkit-d41ccca23deb0a9d2ae4f151ab4f8be87b17797c.tar.lz
bukkit-d41ccca23deb0a9d2ae4f151ab4f8be87b17797c.tar.xz
bukkit-d41ccca23deb0a9d2ae4f151ab4f8be87b17797c.zip
SPIGOT-3663: Add plugin parameter to hidePlayer+showPlayer.
-rw-r--r--src/main/java/org/bukkit/entity/Player.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 33f6e6dc..082302d1 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -22,6 +22,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.conversations.Conversable;
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
import org.bukkit.map.MapView;
+import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.messaging.PluginMessageRecipient;
import org.bukkit.scoreboard.Scoreboard;
@@ -910,17 +911,39 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* Hides a player from this player
*
* @param player Player to hide
+ * @deprecated see {@link #hidePlayer(Plugin, Player)}
*/
+ @Deprecated
public void hidePlayer(Player player);
/**
+ * Hides a player from this player
+ *
+ * @param plugin Plugin that wants to hide the player
+ * @param player Player to hide
+ */
+ public void hidePlayer(Plugin plugin, Player player);
+
+ /**
* Allows this player to see a player that was previously hidden
*
* @param player Player to show
+ * @deprecated see {@link #showPlayer(Plugin, Player)}
*/
+ @Deprecated
public void showPlayer(Player player);
/**
+ * Allows this player to see a player that was previously hidden. If
+ * another another plugin had hidden the player too, then the player will
+ * remain hidden until the other plugin calls this method too.
+ *
+ * @param plugin Plugin that wants to show the player
+ * @param player Player to show
+ */
+ public void showPlayer(Plugin plugin, Player player);
+
+ /**
* Checks to see if a player has been hidden from this player
*
* @param player Player to check