Select "Use account" by default

This commit is contained in:
RaphiMC 2023-11-30 00:09:06 +01:00
parent 058466b51f
commit fdc4f0b70e
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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);
}