From 9081a5aff6c6058083ef556eca4432a1bf32646f Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 22 Apr 2020 08:22:14 +0100 Subject: [PATCH] Fix incorrectly formatted biomes in worlds.yml automagically --- Core/src/main/java/com/plotsquared/core/plot/PlotArea.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java index 8b4cb7e69..b8e2f7ab2 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java @@ -262,7 +262,12 @@ public abstract class PlotArea { this.autoMerge = config.getBoolean("plot.auto_merge"); this.maxPlotMembers = config.getInt("limits.max-members"); this.allowSigns = config.getBoolean("plot.create_signs"); - this.plotBiome = ConfigurationUtil.BIOME.parseString(config.getString("plot.biome")); + String biomeString = config.getString("plot.biome"); + if (!biomeString.startsWith("minecraft:")) { + biomeString = "minecraft:" + biomeString; + config.set("plot.biome", biomeString.toLowerCase()); + } + this.plotBiome = ConfigurationUtil.BIOME.parseString(biomeString.toLowerCase()); this.schematicOnClaim = config.getBoolean("schematic.on_claim"); this.schematicFile = config.getString("schematic.file"); this.schematicClaimSpecify = config.getBoolean("schematic.specify_on_claim");