From 746bf938130eb09b24c9503708b85d3f2e284e53 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Sat, 20 Jan 2024 20:34:55 +0100 Subject: [PATCH] fix: fallback to area QueueCoordinator if null passed --- .../com/plotsquared/bukkit/util/fawe/FaweRegionManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/fawe/FaweRegionManager.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/fawe/FaweRegionManager.java index 5fe07a80d..dce4f0e49 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/fawe/FaweRegionManager.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/fawe/FaweRegionManager.java @@ -38,6 +38,7 @@ import com.sk89q.worldedit.world.biome.BiomeType; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import java.util.Objects; import java.util.Set; public class FaweRegionManager extends BukkitRegionManager { @@ -59,7 +60,10 @@ public class FaweRegionManager extends BukkitRegionManager { @Nullable PlotPlayer actor, @Nullable QueueCoordinator queue ) { - return delegate.setCuboids(area, regions, blocks, minY, maxY, queue.getCompleteTask()); + return delegate.setCuboids( + area, regions, blocks, minY, maxY, + Objects.requireNonNullElseGet(queue, area::getQueue).getCompleteTask() + ); } @Override