From bd4ececc82508778cc67a5e7002bae0526eefc12 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 23:45:05 -0400 Subject: [PATCH] Remove FishingHook reference on Craft Entity removal This caused some bugs chickeneer reported to me, with fishing. --- ...ok-reference-on-Craft-Entity-removal.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Spigot-Server-Patches/0175-Remove-FishingHook-reference-on-Craft-Entity-removal.patch diff --git a/Spigot-Server-Patches/0175-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0175-Remove-FishingHook-reference-on-Craft-Entity-removal.patch new file mode 100644 index 0000000000..a2f43a7dc7 --- /dev/null +++ b/Spigot-Server-Patches/0175-Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -0,0 +1,30 @@ +From 3766c64b653c0ddc3b3688acf16029ded14bbcff Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 16 Jun 2016 00:17:23 -0400 +Subject: [PATCH] Remove FishingHook reference on Craft Entity removal + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java +index ecfc316..3f909c1 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java +@@ -64,6 +64,16 @@ public class CraftFish extends AbstractProjectile implements Fish { + this.biteChance = chance; + } + ++ // Paper start ++ @Override ++ public void remove() { ++ super.remove(); ++ if (getHandle().owner != null) { ++ getHandle().owner.hookedFish = null; ++ } ++ } ++ // Paper end ++ + @Deprecated + public LivingEntity _INVALID_getShooter() { + return (LivingEntity) getShooter(); +-- +2.9.3 +