Update Client.java

This commit is contained in:
kirillsaint 2023-07-25 15:48:47 +06:00
parent 387e9ac10a
commit 89061248d7

View File

@ -220,9 +220,11 @@ public class Client {
if(!globalSettings.configsMigrated && new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").exists() && new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").isDirectory()) { if(!globalSettings.configsMigrated && new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").exists() && new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").isDirectory()) {
logger.info("STARTING > migrating-configs"); logger.info("STARTING > migrating-configs");
for(String file : new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").list()) { for(String file : new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").list()) {
if(!new File(Minecraft.getMinecraft().mcDataDir, "SilentClient/" + file).isDirectory()) {
Client.logger.info("STARTING > migrating-configs > " + file); Client.logger.info("STARTING > migrating-configs > " + file);
FileUtils.copyFile(new File(Minecraft.getMinecraft().mcDataDir, "SilentClient/" + file), new File(Minecraft.getMinecraft().mcDataDir, "SilentClient-Configs/" + file)); FileUtils.copyFile(new File(Minecraft.getMinecraft().mcDataDir, "SilentClient/" + file), new File(Minecraft.getMinecraft().mcDataDir, "SilentClient-Configs/" + file));
} }
}
globalSettings.configsMigrated = true; globalSettings.configsMigrated = true;
globalSettings.save(); globalSettings.save();
} }