mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Auth type refactor in internal config (#2410)
This commit is contained in:
parent
5529a1cc1c
commit
b86648332a
12 changed files with 46 additions and 24 deletions
|
@ -36,6 +36,7 @@ import lombok.Getter;
|
|||
import org.geysermc.common.PlatformType;
|
||||
import org.geysermc.connector.GeyserConnector;
|
||||
import org.geysermc.connector.bootstrap.GeyserBootstrap;
|
||||
import org.geysermc.connector.common.AuthType;
|
||||
import org.geysermc.connector.configuration.GeyserConfiguration;
|
||||
import org.geysermc.connector.dump.BootstrapDumpInfo;
|
||||
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
|
||||
|
@ -116,13 +117,13 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
|||
} catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
|
||||
if (geyserConfig.getRemote().getAuthType().equals("floodgate") && !proxyServer.getPluginManager().getPlugin("floodgate").isPresent()) {
|
||||
if (geyserConfig.getRemote().getAuthType() == AuthType.FLOODGATE && !proxyServer.getPluginManager().getPlugin("floodgate").isPresent()) {
|
||||
geyserLogger.severe(LanguageUtils.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " " + LanguageUtils.getLocaleStringLog("geyser.bootstrap.floodgate.disabling"));
|
||||
return;
|
||||
} else if (geyserConfig.isAutoconfiguredRemote() && proxyServer.getPluginManager().getPlugin("floodgate").isPresent()) {
|
||||
// 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, proxyServer, configFolder.toFile());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue