geforkt von Mirrors/Paper
4e958e229f
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
26 Zeilen
1021 B
Diff
26 Zeilen
1021 B
Diff
From 0000000000000000000000000000000000000000 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/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
|
index 42b306f1a341672996843a5e3dfa57ef32be48e9..385fa768cda07a61079476a7344d492f890e59e9 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
|
@@ -118,4 +118,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
|
|
}
|