From 5ef62d174c1c9d1440957fc5401d50f4fca012f0 Mon Sep 17 00:00:00 2001 From: axolotlmaid Date: Mon, 12 Aug 2024 14:15:04 +0100 Subject: [PATCH] Fix error when deleting profile --- .../axolotlmaid/optionsprofiles/gui/EditProfileScreen.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/src/main/java/com/axolotlmaid/optionsprofiles/gui/EditProfileScreen.java b/common/src/main/java/com/axolotlmaid/optionsprofiles/gui/EditProfileScreen.java index 44c506e..5d9bd81 100644 --- a/common/src/main/java/com/axolotlmaid/optionsprofiles/gui/EditProfileScreen.java +++ b/common/src/main/java/com/axolotlmaid/optionsprofiles/gui/EditProfileScreen.java @@ -108,5 +108,10 @@ public class EditProfileScreen extends Screen { public void onClose() { this.minecraft.setScreen(this.profilesScreen); 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(); + } } } \ No newline at end of file