Fix error when deleting profile

This commit is contained in:
axolotlmaid 2024-08-12 14:15:04 +01:00
parent 919fdc3486
commit 5ef62d174c

View file

@ -108,5 +108,10 @@ public class EditProfileScreen extends Screen {
public void onClose() { public void onClose() {
this.minecraft.setScreen(this.profilesScreen); this.minecraft.setScreen(this.profilesScreen);
this.profilesScreen.profilesList.refreshEntries(); this.profilesScreen.profilesList.refreshEntries();
// Checks if the configuration still exists and wasn't deleted
if (Files.exists(Profiles.PROFILES_DIRECTORY.resolve(profileName.getString()).resolve("configuration.json"))) {
this.profileConfiguration.save();
}
} }
} }