uh oh that breaks autologin

This commit is contained in:
Agatha Lovelace 2021-12-23 01:57:04 +02:00
parent a5a3afeb3e
commit 47f2ebcd98
4 changed files with 3 additions and 16 deletions

View File

@ -78,14 +78,9 @@ public abstract class MixinServerLoginNetworkHandler {
// Player has a Mojang account
httpsURLConnection.disconnect();
if (!config.main.allowExistingNames) {
// Caches the request
mojangAccountNamesCache.add(playername);
} else {
state = ServerLoginNetworkHandler.State.READY_TO_ACCEPT;
this.profile = packet.getProfile();
ci.cancel();
}
// Caches the request
mojangAccountNamesCache.add(playername);
// Authentication continues in original method
}
else if(response == HttpURLConnection.HTTP_NO_CONTENT) {

View File

@ -162,11 +162,6 @@ public class AuthConfig {
*/
public boolean premiumAutologin = false;
/*
* Whether to allow offline players with registered usernames to connect.
*/
public boolean allowExistingNames = false;
/**
* Contains a list of lower case (!) player names
* that should always be treated as offline.

View File

@ -9,7 +9,6 @@ import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.event.server.ServerStoppedEvent;
import net.minecraftforge.fml.loading.FMLPaths;
import org.samo_lego.simpleauth.SimpleAuth;
import org.samo_lego.simpleauth.commands.*;
@Mod(SimpleAuth.MOD_ID)

View File

@ -11,8 +11,6 @@ import net.minecraftforge.fml.common.Mod;
import static net.minecraftforge.eventbus.api.EventPriority.HIGHEST;
import static org.samo_lego.simpleauth.SimpleAuth.MOD_ID;
import org.samo_lego.simpleauth.event.AuthEventHandler;
/**
* This class will take care of actions players try to do,
* and cancel them if they aren't authenticated