Don't allow GC to start when Geyser auth-type is offline

This commit is contained in:
Konicai 2024-08-04 20:42:50 -05:00
parent f7e1c881b3
commit 2d6117ac8c

View file

@ -109,9 +109,11 @@ public class GeyserConnect implements Extension {
this.logger().warning("Either `passthrough-motd` or `passthrough-player-counts` is enabled in the config, this will likely produce errors"); this.logger().warning("Either `passthrough-motd` or `passthrough-player-counts` is enabled in the config, this will likely produce errors");
} }
// If we are using floodgate then disable the extension // If we are using floodgate then disable the extension.
if (geyserInstance.getConfig().getRemote().authType() == AuthType.FLOODGATE) { // GeyserConnect also doesn't support the connection sequence that occurs when the default RemoteServer
this.logger().error("auth-type set to floodgate in the config, this will break GeyserConnect. Disabling!"); // auth-type is offline (and there is no reason to change it when GeyserConnect is in use).
if (geyserInstance.getConfig().getRemote().authType() != AuthType.ONLINE) {
this.logger().error("auth-type is not set to 'online' in the Geyser config, this will break GeyserConnect. Disabling!");
this.disable(); this.disable();
} }
} }