diff --git a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java index 3fd91eb3c..67ad6eb8b 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java @@ -40,12 +40,14 @@ import com.plotsquared.core.util.ChunkManager; import com.plotsquared.core.util.FileBytes; import com.plotsquared.core.util.MainUtil; import com.plotsquared.core.util.MathMan; +import com.plotsquared.core.util.RegionManager; import com.plotsquared.core.util.task.RunnableVal; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockTypes; +import lombok.Getter; import java.io.File; import java.io.IOException; @@ -56,7 +58,7 @@ public class HybridPlotManager extends ClassicPlotManager { public static boolean REGENERATIVE_CLEAR = true; - private final HybridPlotWorld hybridPlotWorld; + @Getter private final HybridPlotWorld hybridPlotWorld; public HybridPlotManager(HybridPlotWorld hybridPlotWorld) { super(hybridPlotWorld); @@ -199,6 +201,12 @@ public class HybridPlotManager extends ClassicPlotManager { *
*/ @Override public boolean clearPlot(Plot plot, final Runnable whenDone) { + if (RegionManager.manager.notifyClear(this)) { + //If this returns false, the clear didn't work + if (RegionManager.manager.handleClear(plot, whenDone, this)) { + return true; + } + } final String world = hybridPlotWorld.getWorldName(); Location pos1 = plot.getBottomAbs(); Location pos2 = plot.getExtendedTopAbs(); diff --git a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java index e322072df..a561a9ac3 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java @@ -50,6 +50,7 @@ import com.sk89q.worldedit.math.transform.AffineTransform; import com.sk89q.worldedit.util.Direction; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; +import lombok.Getter; import org.jetbrains.annotations.NotNull; import java.io.File; @@ -69,6 +70,7 @@ public class HybridPlotWorld extends ClassicPlotWorld { public HashMap