3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-20 06:50:09 +01:00

Auth type refactor in internal config (#26)

Dieser Commit ist enthalten in:
Konicai 2021-07-28 19:53:08 -04:00 committet von GitHub
Ursprung 38539c2148
Commit 7f21a68d8d
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -1,6 +1,6 @@
# Geyser-Fabric
[![forthebadge made-with-java](https://ForTheBadge.com/images/badges/made-with-java.svg)](https://java.com/)
[![forthebadge made-with-java](https://forthebadge.com/images/badges/made-with-java.svg)](https://java.com/)
Download: [![Build Status](https://ci.nukkitx.com/job/GeyserMC/job/Geyser-Fabric/job/java-1.17/badge/icon)](https://ci.opencollab.dev//job/GeyserMC/job/Geyser-Fabric/job/java-1.17/)

Datei anzeigen

@ -40,6 +40,7 @@ import org.geysermc.connector.GeyserLogger;
import org.geysermc.connector.bootstrap.GeyserBootstrap;
import org.geysermc.connector.command.CommandManager;
import org.geysermc.connector.command.GeyserCommand;
import org.geysermc.connector.common.AuthType;
import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.dump.BootstrapDumpInfo;
import org.geysermc.connector.network.translators.world.WorldManager;
@ -145,13 +146,13 @@ public class GeyserFabricMod implements ModInitializer, GeyserBootstrap {
Optional<ModContainer> floodgate = FabricLoader.getInstance().getModContainer("floodgate");
boolean floodgatePresent = floodgate.isPresent();
if (geyserConfig.getRemote().getAuthType().equals("floodgate") && !floodgatePresent) {
if (geyserConfig.getRemote().getAuthType() == AuthType.FLOODGATE && !floodgatePresent) {
geyserLogger.severe(LanguageUtils.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " " + LanguageUtils.getLocaleStringLog("geyser.bootstrap.floodgate.disabling"));
return;
} else if (geyserConfig.isAutoconfiguredRemote() && floodgatePresent) {
// Floodgate installed means that the user wants Floodgate authentication
geyserLogger.debug("Auto-setting to Floodgate authentication.");
geyserConfig.getRemote().setAuthType("floodgate");
geyserConfig.getRemote().setAuthType(AuthType.FLOODGATE);
}
geyserConfig.loadFloodgate(this, floodgate.orElse(null));