Update Client.java

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

View File

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