diff --git a/pom.xml b/pom.xml
index eb2b390ee..c3db4822c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.William278
HuskHomes
- 2.1.0
+ 2.1
jar
HuskHomes
diff --git a/src/main/java/me/william278/huskhomes2/Migrators/legacyVersionMigrator.java b/src/main/java/me/william278/huskhomes2/Migrators/legacyVersionMigrator.java
index f2ec1ffbb..bf1f16d0b 100644
--- a/src/main/java/me/william278/huskhomes2/Migrators/legacyVersionMigrator.java
+++ b/src/main/java/me/william278/huskhomes2/Migrators/legacyVersionMigrator.java
@@ -53,6 +53,27 @@ public static void checkStartupMigration() {
Bukkit.getLogger().info("Moved old messages.yml --> HuskHomes/MigratedData/OLD_messages.yml");
}
}
+ } else {
+ if (config.getInt("config_file_version") == 1) {
+ config.set("config_file_version", 2);
+ String language = config.getString("language");
+ if (language != null) {
+ if (language.length() == 5) {
+ File messagesFile = new File(plugin.getDataFolder() + File.separator + "OLD_messages_" + language + ".yml");
+ if (messagesFile.exists()) {
+ if (!messagesFile.renameTo(new File("messages " + language + ".yml"))) {
+ Bukkit.getLogger().warning("Failed to move messages file (System error)! Please delete it and regenerate it!");
+ } else {
+ Bukkit.getLogger().info("The language file has been moved as it needs regenerating!");
+ }
+ }
+ } else {
+ Bukkit.getLogger().warning("Failed to move messages file (Invalid language format)! Please delete it and regenerate it!");
+ }
+ } else {
+ Bukkit.getLogger().warning("Failed to move messages file (Missing language string)! Please delete it and regenerate it!");
+ }
+ }
}
}
}
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index a36592be7..1a6e2acc9 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -59,4 +59,4 @@ economy_integration:
make_home_public: 50
random_teleport: 20
handle_vanished_players: true
-config_file_version: 1
\ No newline at end of file
+config_file_version: 2
\ No newline at end of file