mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Implemented floodgate support for ViaProxy
This commit is contained in:
parent
cbb84d91bc
commit
4e490634a3
2 changed files with 13 additions and 10 deletions
|
@ -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);
|
||||||
|
|
|
@ -308,15 +308,17 @@ public class GeyserImpl implements GeyserApi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean floodgatePresent = bootstrap.testFloodgatePluginPresent();
|
if (platformType != PlatformType.VIAPROXY) {
|
||||||
if (config.getRemote().authType() == AuthType.FLOODGATE && !floodgatePresent) {
|
boolean floodgatePresent = bootstrap.testFloodgatePluginPresent();
|
||||||
logger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " "
|
if (config.getRemote().authType() == AuthType.FLOODGATE && !floodgatePresent) {
|
||||||
+ GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.disabling"));
|
logger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " "
|
||||||
return;
|
+ GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.disabling"));
|
||||||
} else if (config.isAutoconfiguredRemote() && floodgatePresent) {
|
return;
|
||||||
// Floodgate installed means that the user wants Floodgate authentication
|
} else if (config.isAutoconfiguredRemote() && floodgatePresent) {
|
||||||
logger.debug("Auto-setting to Floodgate authentication.");
|
// Floodgate installed means that the user wants Floodgate authentication
|
||||||
config.getRemote().setAuthType(AuthType.FLOODGATE);
|
logger.debug("Auto-setting to Floodgate authentication.");
|
||||||
|
config.getRemote().setAuthType(AuthType.FLOODGATE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue