Add version of old message file to the file name

This commit is contained in:
Aust1n46 2020-03-25 18:15:39 -04:00
parent 6cd814893d
commit a7ff8e29a3

View File

@ -27,7 +27,7 @@ public class Localization {
if(!fileVersion.equals(currentVersion)) {
Bukkit.getConsoleSender().sendMessage(Format.FormatStringAll("&8[&eVentureChat&8]&e - Version Change Detected! Saving Old Messages.yml and Generating Latest File"));
localizationFile.renameTo(new File(plugin.getDataFolder().getAbsolutePath(), "Messages_Old.yml"));
localizationFile.renameTo(new File(plugin.getDataFolder().getAbsolutePath(), "Messages_Old_" + fileVersion + ".yml"));
plugin.saveResource("Messages.yml", true);
localization = YamlConfiguration.loadConfiguration(localizationFile);
}