From 49a8cf4716d62ef1e59eb7182afedb26de7f41c9 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 9 Jun 2015 09:16:01 +1000 Subject: [PATCH] Fix patches from camera API --- Bukkit-Patches/0004-BungeeCord-Support.patch | 4 ++-- CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch | 4 ++-- .../0132-Prevent-a-crash-involving-attributes.patch | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Bukkit-Patches/0004-BungeeCord-Support.patch b/Bukkit-Patches/0004-BungeeCord-Support.patch index 205cc663f4..0fb40b0ab1 100644 --- a/Bukkit-Patches/0004-BungeeCord-Support.patch +++ b/Bukkit-Patches/0004-BungeeCord-Support.patch @@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline - * @see Player#setHealthScaled(boolean) + * {@link GameMode#SPECTATOR} */ - public double getHealthScale(); + public void setSpectatorTarget(Entity entity); + + // Spigot start + public class Spigot extends Entity.Spigot diff --git a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch index 61b5a51cb5..cdb3c0e1c0 100644 --- a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch +++ b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch @@ -108,8 +108,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - } - collection.add(new AttributeModifiable(getHandle().getAttributeMap(), (new AttributeRanged(null, "generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true))); + Preconditions.checkArgument(getGameMode() == GameMode.SPECTATOR, "Player must be in spectator mode"); + getHandle().setSpectatorTarget((entity == null) ? null : ((CraftEntity) entity).getHandle()); } + + // Spigot start diff --git a/CraftBukkit-Patches/0132-Prevent-a-crash-involving-attributes.patch b/CraftBukkit-Patches/0132-Prevent-a-crash-involving-attributes.patch index 778f6e95c6..344eefb06e 100644 --- a/CraftBukkit-Patches/0132-Prevent-a-crash-involving-attributes.patch +++ b/CraftBukkit-Patches/0132-Prevent-a-crash-involving-attributes.patch @@ -24,5 +24,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Spigot end } - // Spigot start + @Override -- \ No newline at end of file