3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 22:40:18 +01:00

Implemented floodgate support for ViaProxy

Dieser Commit ist enthalten in:
RaphiMC 2023-11-04 17:07:35 +01:00
Ursprung cbb84d91bc
Commit 4e490634a3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0F6BB0657A03AC94
2 geänderte Dateien mit 13 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -43,6 +43,7 @@ import org.jetbrains.annotations.NotNull;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.UUID; import java.util.UUID;
@ -73,7 +74,7 @@ public class GeyserViaProxyBootstrap implements GeyserBootstrap {
return; return;
} }
config.getRemote().setAuthType(AuthType.OFFLINE); config.getRemote().setAuthType(Files.isRegularFile(this.config.getFloodgateKeyPath()) ? AuthType.FLOODGATE : AuthType.OFFLINE);
GeyserConfiguration.checkGeyserConfiguration(this.config, this.logger); GeyserConfiguration.checkGeyserConfiguration(this.config, this.logger);
this.geyser = GeyserImpl.load(PlatformType.VIAPROXY, this); this.geyser = GeyserImpl.load(PlatformType.VIAPROXY, this);

Datei anzeigen

@ -308,6 +308,7 @@ public class GeyserImpl implements GeyserApi {
} }
} }
if (platformType != PlatformType.VIAPROXY) {
boolean floodgatePresent = bootstrap.testFloodgatePluginPresent(); boolean floodgatePresent = bootstrap.testFloodgatePluginPresent();
if (config.getRemote().authType() == AuthType.FLOODGATE && !floodgatePresent) { if (config.getRemote().authType() == AuthType.FLOODGATE && !floodgatePresent) {
logger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " " logger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " "
@ -319,6 +320,7 @@ public class GeyserImpl implements GeyserApi {
config.getRemote().setAuthType(AuthType.FLOODGATE); config.getRemote().setAuthType(AuthType.FLOODGATE);
} }
} }
}
String remoteAddress = config.getRemote().address(); String remoteAddress = config.getRemote().address();
// Filters whether it is not an IP address or localhost, because otherwise it is not possible to find out an SRV entry. // Filters whether it is not an IP address or localhost, because otherwise it is not possible to find out an SRV entry.