diff --git a/Towny/pom.xml b/Towny/pom.xml
index af7b10caca..873d0e5cb3 100644
--- a/Towny/pom.xml
+++ b/Towny/pom.xml
@@ -13,7 +13,7 @@
towny
jar
- 0.100.2.10
+ 0.100.2.11
diff --git a/Towny/src/main/java/com/palmergames/bukkit/config/migration/RunnableMigrations.java b/Towny/src/main/java/com/palmergames/bukkit/config/migration/RunnableMigrations.java
index 532bfe8a20..0b1859ce57 100644
--- a/Towny/src/main/java/com/palmergames/bukkit/config/migration/RunnableMigrations.java
+++ b/Towny/src/main/java/com/palmergames/bukkit/config/migration/RunnableMigrations.java
@@ -17,6 +17,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.function.Consumer;
+import java.util.stream.Collectors;
@SuppressWarnings("FieldCanBeLocal")
public class RunnableMigrations {
@@ -97,11 +98,12 @@ else if (Boolean.parseBoolean(config.getString("notification.notifications_appea
for (Map, ?> plotType : config.getMapList("townblocktypes.types")) {
if (!plotType.get("name").equals("farm"))
continue;
- List currentBlocks = Arrays.asList(((String) plotType.get("allowedBlocks")).split(","));
- Arrays.asList(TownySettings.getDefaultFarmblocks().split(",")).stream()
+ String rawBlocks = (String) plotType.get("allowedBlocks");
+ List currentBlocks = Arrays.asList(rawBlocks.split(","));
+ List missingBlocks = Arrays.asList(TownySettings.getDefaultFarmblocks().split(",")).stream()
.filter(block -> !currentBlocks.contains(block))
- .forEach(block -> currentBlocks.add(block));
- ((Map) plotType).replace("allowedBlocks", StringMgmt.join(currentBlocks, ","));
+ .collect(Collectors.toList());
+ ((Map) plotType).replace("allowedBlocks", rawBlocks + "," + StringMgmt.join(missingBlocks, ","));
}
};
}
diff --git a/Towny/src/main/resources/ChangeLog.txt b/Towny/src/main/resources/ChangeLog.txt
index 2e76943632..61bc05db07 100644
--- a/Towny/src/main/resources/ChangeLog.txt
+++ b/Towny/src/main/resources/ChangeLog.txt
@@ -9777,4 +9777,6 @@ v0.92.0.11:
- Also includes other pom maintenance.
- Update FarmPlotBlocks to automatically update from ItemLists when generating defaults.
- Also adds a new ConfigMigration type specifically for farm blocks.
- - Existing configs will add in any missing farm blocks.
\ No newline at end of file
+ - Existing configs will add in any missing farm blocks.
+0.100.2.11:
+ - Fix FarmPlotBlock migration failing on server upgrade.
\ No newline at end of file