From 955a2a43a25a4763daacbdbc5cfb9022c8ada20e Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 7 Jun 2015 17:54:12 +1000 Subject: [PATCH] SPIGOT-436: Add spectator camera API. By: md_5 --- paper-api/src/main/java/org/bukkit/entity/Player.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index 1d0daaf53d..c10ffa1343 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -5,6 +5,7 @@ import java.net.InetSocketAddress; import org.bukkit.Achievement; import org.bukkit.ChatColor; import org.bukkit.Effect; +import org.bukkit.GameMode; import org.bukkit.Instrument; import org.bukkit.Location; import org.bukkit.Material; @@ -1035,4 +1036,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @see Player#setHealthScaled(boolean) */ public double getHealthScale(); + + /** + * Sets the entity which is followed by the camera when in + * {@link GameMode#SPECTATOR}. + * + * @param entity the entity to follow or null to reset + * @throws IllegalStateException if the player is not in + * {@link GameMode#SPECTATOR} + */ + public void setSpectatorTarget(Entity entity); }