Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
19de9af63c
Functional GUI fix added by billygalbreath
23 Zeilen
927 B
Diff
23 Zeilen
927 B
Diff
From fad81fed4375e1773483c5c5aedbaac86b273ee3 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index eafdcb916..d37a2fa0a 100644
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
|
|
@@ -55,7 +55,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.25.0.windows.1
|
|
|