2016-12-03 03:11:39 +00:00
|
|
|
From 7342a055c028ef8bc6511d931e50eb5c5176ee9b Mon Sep 17 00:00:00 2001
|
2016-09-22 03:45:05 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
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();
|
|
|
|
--
|
2016-11-17 02:23:38 +00:00
|
|
|
2.10.2
|
2016-09-22 03:45:05 +00:00
|
|
|
|