From e5859062c669a5533ad776f697308cb90cf4cfb9 Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Wed, 15 Oct 2025 22:30:09 +0100 Subject: [PATCH] refactor: remove rename profile button --- .../optionsprofiles/gui/EditProfileScreen.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/common/src/main/java/net/trafficlunar/optionsprofiles/gui/EditProfileScreen.java b/common/src/main/java/net/trafficlunar/optionsprofiles/gui/EditProfileScreen.java index 37c59fb..27eb40a 100644 --- a/common/src/main/java/net/trafficlunar/optionsprofiles/gui/EditProfileScreen.java +++ b/common/src/main/java/net/trafficlunar/optionsprofiles/gui/EditProfileScreen.java @@ -62,18 +62,6 @@ public class EditProfileScreen extends Screen { .build(), LayoutSettings::alignHorizontallyCenter ); - linearLayoutButtons.addChild( - Button.builder( - Component.translatable("gui.optionsprofiles.rename-profile"), - (button) -> { - Profiles.renameProfile(profileName.getString(), this.profileNameEdit.getValue()); - this.minecraft.setScreen(new EditProfileScreen(profilesScreen, Component.literal(this.profileNameEdit.getValue()))); - }) - .size(150, 20) - .pos(this.width / 2 - 75, 166) - .build(), - LayoutSettings::alignHorizontallyCenter - ); linearLayoutButtons.addChild( Button.builder( Component.translatable("gui.optionsprofiles.options-toggle").append("..."), @@ -140,6 +128,8 @@ public class EditProfileScreen extends Screen { if (!deleted) { this.profileConfiguration.setServers(this.serversEdit.getValue()); this.profileConfiguration.save(); + + Profiles.renameProfile(profileName.getString(), this.profileNameEdit.getValue()); } this.minecraft.setScreen(this.profilesScreen); this.profilesScreen.profilesList.refreshEntries();