From fdc4f0b70e88a87ea2ffc5082fb64647cd7375fc Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Thu, 30 Nov 2023 00:09:06 +0100 Subject: [PATCH] Select "Use account" by default --- src/main/java/net/raphimc/viaproxy/ui/impl/GeneralTab.java | 4 ++-- src/main/java/net/raphimc/viaproxy/ui/impl/RealmsTab.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/raphimc/viaproxy/ui/impl/GeneralTab.java b/src/main/java/net/raphimc/viaproxy/ui/impl/GeneralTab.java index c880975..d7d4eda 100644 --- a/src/main/java/net/raphimc/viaproxy/ui/impl/GeneralTab.java +++ b/src/main/java/net/raphimc/viaproxy/ui/impl/GeneralTab.java @@ -141,7 +141,7 @@ public class GeneralTab extends AUITab { JLabel minecraftAccountLabel = new JLabel(I18n.get("tab.general.minecraft_account.label")); GBC.create(body).grid(0, gridy++).insets(BODY_BLOCK_PADDING, BORDER_PADDING, 0, 0).anchor(GridBagConstraints.NORTHWEST).add(minecraftAccountLabel); - this.authMethod = new JComboBox<>(new String[]{I18n.get("tab.general.minecraft_account.option_no_account"), I18n.get("tab.general.minecraft_account.option_select_account"), I18n.get("tab.general.minecraft_account.option_openauthmod")}); + this.authMethod = new JComboBox<>(new String[]{I18n.get("tab.general.minecraft_account.option_select_account"), I18n.get("tab.general.minecraft_account.option_no_account"), I18n.get("tab.general.minecraft_account.option_openauthmod")}); ViaProxy.getSaveManager().uiSave.loadComboBox("auth_method", this.authMethod); GBC.create(body).grid(0, gridy++).weightx(1).insets(0, BORDER_PADDING, 0, BORDER_PADDING).fill(GridBagConstraints.HORIZONTAL).add(this.authMethod); } @@ -266,7 +266,7 @@ public class GeneralTab extends AUITab { Options.MC_ACCOUNT = new OfflineAccount(path[0]); Options.CLASSIC_MP_PASS = path[1]; } else { // Normal address - if (authMethod != 1) { + if (authMethod != 0) { Options.MC_ACCOUNT = null; } else if (Options.MC_ACCOUNT == null) { this.frame.accountsTab.markSelected(0); diff --git a/src/main/java/net/raphimc/viaproxy/ui/impl/RealmsTab.java b/src/main/java/net/raphimc/viaproxy/ui/impl/RealmsTab.java index 169b0a6..9b69828 100644 --- a/src/main/java/net/raphimc/viaproxy/ui/impl/RealmsTab.java +++ b/src/main/java/net/raphimc/viaproxy/ui/impl/RealmsTab.java @@ -258,7 +258,7 @@ public class RealmsTab extends AUITab { } generalTab.serverAddress.setText(address); generalTab.serverVersion.setSelectedItem(version); - generalTab.authMethod.setSelectedIndex(1); + generalTab.authMethod.setSelectedIndex(0); generalTab.stateButton.doClick(); ViaProxy.getUI().contentPane.setSelectedIndex(0); }