From 5d332e7d581d1260dd705393ca25b7d861d56805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Wed, 8 Apr 2020 00:01:58 +0200 Subject: [PATCH] Fix plot clearing in normal plot worlds --- .../plotsquared/plot/generator/HybridPlotManager.java | 4 ++-- .../plotsquared/plot/object/PlotAreaTerrainType.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java index 2fb06cc15..bf7e84062 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java @@ -179,8 +179,8 @@ public class HybridPlotManager extends ClassicPlotManager { Location pos2 = plot.getExtendedTopAbs(); // If augmented final boolean canRegen = - (hybridPlotWorld.getType() == PlotAreaType.NORMAL) - && (hybridPlotWorld.getTerrain() == PlotAreaTerrainType.NONE) && REGENERATIVE_CLEAR; + (hybridPlotWorld.getType() == PlotAreaType.AUGMENTED) + && (hybridPlotWorld.getTerrain() != PlotAreaTerrainType.NONE) && REGENERATIVE_CLEAR; // The component blocks final Pattern plotfloor = hybridPlotWorld.TOP_BLOCK.toPattern(); final Pattern filling = hybridPlotWorld.MAIN_BLOCK.toPattern(); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaTerrainType.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaTerrainType.java index b78b5a2a9..5bbc79b1e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaTerrainType.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotAreaTerrainType.java @@ -32,7 +32,7 @@ public enum PlotAreaTerrainType { .collect(Collectors.toMap(e -> e.toString().toLowerCase(), Function.identity())); public static Optional fromString(String typeString) { - return Optional.ofNullable(types.get(typeString)); + return Optional.ofNullable(types.get(typeString.toLowerCase())); } @Deprecated