stop the server if someone tries to disable the plugin

This commit is contained in:
2024-10-25 13:35:34 +02:00
parent 6e8cdc7afb
commit 18457a36ca
@@ -16,6 +16,8 @@ public final class Enchantio extends JavaPlugin {
@Override @Override
public void onDisable() { public void onDisable() {
// Plugin shutdown logic if (getServer().isStopping()) return;
getLogger().severe("Enchantio is being disabled without a server shutdown. Server will be shut down to prevent issues.");
getServer().shutdown();
} }
} }