Feature: Detect incorrect proxy setups (#4941)

* Feature: Detect & warn about incorrect proxy setups on Spigot platforms

* Properly disable Geyser if we failed to load
This commit is contained in:
chris 2024-08-11 00:50:27 +02:00 committed by GitHub
parent 41e65b0fcc
commit d3ea65196b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 45 additions and 9 deletions

View file

@ -71,9 +71,6 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
private IGeyserPingPassthrough geyserBungeePingPassthrough;
private GeyserImpl geyser;
// We can't disable the plugin; hence we need to keep track of it manually
private boolean disabled;
@Override
public void onLoad() {
onGeyserInitialize();
@ -98,7 +95,6 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
}
if (!this.loadConfig()) {
disabled = true;
return;
}
this.geyserLogger.setDebug(geyserConfig.isDebugMode());
@ -112,7 +108,7 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
@Override
public void onEnable() {
if (disabled) {
if (geyser == null) {
return; // Config did not load properly!
}
// Big hack - Bungee does not provide us an event to listen to, so schedule a repeating