Assume account auth when account index is specified

This commit is contained in:
RaphiMC 2024-04-27 17:58:14 +02:00
parent 332f37804f
commit 6ff8f62aca
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94

View file

@ -150,7 +150,8 @@ public class ViaProxyConfig extends Config implements com.viaversion.viaversion.
this.authMethod = options.valueOf(this.optionAuthMethod);
final List<Account> accounts = ViaProxy.getSaveManager().accountsSave.getAccounts();
final int accountIndex = options.valueOf(this.optionMinecraftAccountIndex);
if (this.authMethod == AuthMethod.ACCOUNT && accountIndex >= 0 && accountIndex < accounts.size()) {
if (options.has(this.optionMinecraftAccountIndex) && accountIndex >= 0 && accountIndex < accounts.size()) {
this.authMethod = AuthMethod.ACCOUNT;
this.account = accounts.get(accountIndex);
} else {
this.account = null;