Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Force-disable query if it would interfere with Geyser's startup.
Fixes #3312
Dieser Commit ist enthalten in:
Ursprung
04883a166a
Commit
97ec5fec33
@ -137,6 +137,24 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force-disable query if enabled, or else Geyser won't enable
|
||||||
|
for (ListenerInfo info : getProxy().getConfig().getListeners()) {
|
||||||
|
if (info.isQueryEnabled() && info.getQueryPort() == geyserConfig.getBedrock().port()) {
|
||||||
|
try {
|
||||||
|
Field queryField = ListenerInfo.class.getDeclaredField("queryEnabled");
|
||||||
|
queryField.setAccessible(true);
|
||||||
|
queryField.setBoolean(info, false);
|
||||||
|
geyserLogger.warning("We force-disabled query on port " + info.getQueryPort() + " in order for Geyser to boot up successfully. " +
|
||||||
|
"To remove this message, disable query in your proxy's config.");
|
||||||
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
geyserLogger.warning("Could not force-disable query. Geyser may not start correctly!");
|
||||||
|
if (geyserLogger.isDebug()) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (geyserConfig.getRemote().authType() == AuthType.FLOODGATE && getProxy().getPluginManager().getPlugin("floodgate") == null) {
|
if (geyserConfig.getRemote().authType() == AuthType.FLOODGATE && getProxy().getPluginManager().getPlugin("floodgate") == null) {
|
||||||
geyserLogger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " " + GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.disabling"));
|
geyserLogger.severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.not_installed") + " " + GeyserLocale.getLocaleStringLog("geyser.bootstrap.floodgate.disabling"));
|
||||||
return;
|
return;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren