2019-07-16 22:09:32 +00:00
|
|
|
From ff5541a03601804d2ebb129189050015e3bf35c4 Mon Sep 17 00:00:00 2001
|
2018-07-18 00:37:30 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Wed, 29 Nov 2017 22:18:54 -0500
|
|
|
|
Subject: [PATCH] Avoid NPE in PathfinderGoalTempt
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
2019-07-16 22:09:32 +00:00
|
|
|
index 1bf5d6c08..0b036f29c 100644
|
2018-07-18 00:37:30 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
2019-04-27 23:23:53 +00:00
|
|
|
@@ -55,7 +55,7 @@ public class PathfinderGoalTempt extends PathfinderGoal {
|
2018-07-18 00:37:30 +00:00
|
|
|
}
|
|
|
|
this.target = (event.getTarget() == null) ? null : ((CraftLivingEntity) event.getTarget()).getHandle();
|
|
|
|
}
|
|
|
|
- return tempt;
|
|
|
|
+ return tempt && this.target != null; // Paper - must have target - plugin might of cancelled
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2019-06-25 19:18:50 +00:00
|
|
|
2.22.0
|
2018-07-18 00:37:30 +00:00
|
|
|
|