mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fixed auto-setting auth-type to Floodgate
This commit is contained in:
parent
d4ffecb500
commit
7c1100b830
9 changed files with 51 additions and 45 deletions
|
@ -126,18 +126,7 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
|||
} catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
|
||||
if (geyserConfig.getRemote().authType() == AuthType.FLOODGATE && proxyServer.getPluginManager().getPlugin("floodgate").isEmpty()) {
|
||||
geyserLogger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " "
|
||||
+ GeyserLocale.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(AuthType.FLOODGATE);
|
||||
}
|
||||
|
||||
geyserConfig.loadFloodgate(this, proxyServer, configFolder.toFile());
|
||||
|
||||
}
|
||||
|
||||
private void postStartup() {
|
||||
|
@ -242,4 +231,9 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
|||
public int getServerPort() {
|
||||
return proxyServer.getBoundAddress().getPort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFloodgatePluginPresent() {
|
||||
return proxyServer.getPluginManager().getPlugin("floodgate").isPresent();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue