Skip to content

Commit

Permalink
fix entity wrapper task causing NPE onReload (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
CJCrafter authored Oct 12, 2024
1 parent 6584d3a commit d8d6c8d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,9 @@ public void onDisable() {
// This won't cancel move tasks on Folia... We have to do it manually
foliaScheduler.cancelTasks();
for (EntityWrapper entityWrapper : entityWrappers.values()) {
entityWrapper.getMoveTask().cancel();
TaskImplementation<Void> moveTask = entityWrapper.getMoveTask();
if (moveTask != null)
moveTask.cancel();
}

BlockDamageData.regenerateAll();
Expand Down

0 comments on commit d8d6c8d

Please sign in to comment.