From a811f2e4313c6205db1b899c4c23abb6e1fefef9 Mon Sep 17 00:00:00 2001 From: Aikar 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 index 188825d1..8004f3a3 100644 --- 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 } } -- 2.14.3