2018-01-18 07:00:51 +01:00
|
|
|
From 080f3de513fd1534aa3a9e5eb63741a854d9d2db Mon Sep 17 00:00:00 2001
|
2017-11-30 04:19:24 +01: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
|
2018-01-16 04:13:17 +01:00
|
|
|
index 188825d19..8004f3a3f 100644
|
2017-11-30 04:19:24 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
|
|
@@ -54,7 +54,7 @@ public class PathfinderGoalTempt extends PathfinderGoal {
|
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2018-01-18 07:00:51 +01:00
|
|
|
2.16.1
|
2017-11-30 04:19:24 +01:00
|
|
|
|