2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 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
|
|
|
|
|
|
|
|
|
2018-07-16 20:08:09 +00:00
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
2021-06-11 06:29:15 +00:00
|
|
|
index 4dd3deaabfdb383ded92920e1a313b61a1b9262b..4805bce05f2856289608f45df4fca322de161b31 100644
|
2018-07-16 20:08:09 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
2021-03-08 23:12:31 +00:00
|
|
|
@@ -119,4 +119,14 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
|
2021-01-23 05:23:36 +00:00
|
|
|
public HookState getState() {
|
|
|
|
return HookState.values()[getHandle().hookState.ordinal()];
|
2016-09-22 03:45:05 +00:00
|
|
|
}
|
2018-01-05 07:30:03 +00:00
|
|
|
+
|
2016-09-22 03:45:05 +00:00
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public void remove() {
|
|
|
|
+ super.remove();
|
2020-06-26 12:04:38 +00:00
|
|
|
+ if (getHandle().getOwner() != null) {
|
|
|
|
+ getHandle().getOwner().hookedFish = null;
|
2016-09-22 03:45:05 +00:00
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
2018-01-05 07:30:03 +00:00
|
|
|
}
|