From ee43ef836925716fdf8eab26befd405836c56259 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 13 Aug 2024 01:45:25 +0200 Subject: [PATCH] Disable the plugin if we failed to load on Spigot (#4960) --- .../geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java index a2d52ce5a..c52927a83 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java @@ -175,8 +175,9 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap { @Override public void onEnable() { - // Disabling the plugin in onLoad() is not supported; we need to manually stop here + // Disabling the plugin in onLoad() is not supported; we need to manually stop here and disable ourselves if (geyser == null) { + Bukkit.getPluginManager().disablePlugin(this); return; }