2022-12-26 04:22:08 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: NonSwag <mrminecraft00@gmail.com>
|
|
|
|
Date: Tue, 6 Dec 2022 23:04:21 +0100
|
|
|
|
Subject: [PATCH] Fix NPE on Allay#stopDancing while not dancing
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
2023-08-13 23:32:51 +00:00
|
|
|
index cb8c2d0efa72c00a57dee5949943f6c7a2019c64..dc19a0ad99deed9cc71c243322e375b740db7a9b 100644
|
2022-12-26 04:22:08 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
2023-08-13 23:32:51 +00:00
|
|
|
@@ -78,7 +78,7 @@ public class CraftAllay extends CraftCreature implements org.bukkit.entity.Allay
|
2022-12-26 04:22:08 +00:00
|
|
|
public void stopDancing() {
|
|
|
|
this.getHandle().forceDancing = false;
|
|
|
|
this.getHandle().jukeboxPos = null;
|
|
|
|
- this.getHandle().setJukeboxPlaying(null, false);
|
|
|
|
+ this.getHandle().setDancing(false); // Paper - Directly modify set dancing to avoid NPE
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|