From 001ae78fb20c9397f4d0cdb76e6f87951cee6394 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Sat, 14 Sep 2024 10:46:27 +0200 Subject: [PATCH] fix: load single plot areas on creation (#4490) * fix: load single plot areas on creation * fix: don't allow overlapping plot areas --- Core/src/main/java/com/plotsquared/core/PlotSquared.java | 5 ++--- Core/src/main/java/com/plotsquared/core/command/Area.java | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/PlotSquared.java b/Core/src/main/java/com/plotsquared/core/PlotSquared.java index 702de9e68..8477a2fb4 100644 --- a/Core/src/main/java/com/plotsquared/core/PlotSquared.java +++ b/Core/src/main/java/com/plotsquared/core/PlotSquared.java @@ -795,9 +795,8 @@ public class PlotSquared { if (world.equals("CheckingPlotSquaredGenerator")) { return; } - if (!this.getPlotAreaManager().addWorld(world)) { - return; - } + // Don't check the return result -> breaks runtime loading of single plot areas on creation + this.getPlotAreaManager().addWorld(world); Set worlds; if (this.worldConfiguration.contains("worlds")) { worlds = this.worldConfiguration.getConfigurationSection("worlds").getKeys(false); diff --git a/Core/src/main/java/com/plotsquared/core/command/Area.java b/Core/src/main/java/com/plotsquared/core/command/Area.java index 5897322b2..4d3b2287b 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Area.java +++ b/Core/src/main/java/com/plotsquared/core/command/Area.java @@ -184,6 +184,7 @@ public class Area extends SubCommand { CuboidRegion.makeCuboid(playerSelectedRegion) ).length != 0) { player.sendMessage(TranslatableCaption.of("single.single_area_overlapping")); + return false; } // Alter the region final BlockVector3 playerSelectionMin = playerSelectedRegion.getMinimumPoint();