From b630baef553e219912751f98c991f65a70009a33 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 28 Jan 2022 20:29:41 +0000 Subject: [PATCH] Fix offset for min build height in SchematicHandler --- .../java/com/plotsquared/core/util/SchematicHandler.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java b/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java index 4cdec0077..7c4b9bc07 100644 --- a/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java +++ b/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java @@ -329,7 +329,7 @@ public abstract class SchematicHandler { if (pw instanceof ClassicPlotWorld) { y_offset_actual = yOffset + pw.getMinBuildHeight() + ((ClassicPlotWorld) pw).PLOT_HEIGHT; } else { - y_offset_actual = yOffset + 1 + this.worldUtil + y_offset_actual = yOffset + pw.getMinBuildHeight() + this.worldUtil .getHighestBlockSynchronous(plot.getWorldName(), region.getMinimumPoint().getX() + 1, region.getMinimumPoint().getZ() + 1 ); @@ -388,8 +388,10 @@ public abstract class SchematicHandler { if (actor != null && Settings.QUEUE.NOTIFY_PROGRESS) { queue.addProgressSubscriber(subscriberFactory.createWithActor(actor)); } - whenDone.value = true; - queue.setCompleteTask(whenDone); + if (whenDone != null) { + whenDone.value = true; + queue.setCompleteTask(whenDone); + } queue.enqueue(); } catch (Exception e) { e.printStackTrace();