diff options
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch')
-rw-r--r-- | Spigot-Server-Patches-Unmapped/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches-Unmapped/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch new file mode 100644 index 0000000000..ece37f9326 --- /dev/null +++ b/Spigot-Server-Patches-Unmapped/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +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/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +index f8e897f0bc4e5d0a432d20983fd37998bb00ae0f..b480ca876687991685b5e070181721da8192a5b6 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +@@ -119,4 +119,14 @@ public class CraftFishHook extends CraftProjectile implements FishHook { + public HookState getState() { + return HookState.values()[getHandle().hookState.ordinal()]; + } ++ ++ // Paper start ++ @Override ++ public void remove() { ++ super.remove(); ++ if (getHandle().getOwner() != null) { ++ getHandle().getOwner().hookedFish = null; ++ } ++ } ++ // Paper end + } |