3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0157-Remove-FishingHook-reference-on-Craft-Entity-removal.patch
2017-06-18 20:37:08 -05:00

31 Zeilen
987 B
Diff

From 7ecd4df4d533f975f1ae131efd9bcba40d069160 Mon Sep 17 00:00:00 2001
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 ecfc316b..3f909c17 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.13.1.windows.2