From 3394968b9e475ee82102b7c0f0268935768ff2ea Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 29 Jul 2021 00:18:39 +0200 Subject: [PATCH] Hotfix BungeeCore --- src/de/steamwar/bungeecore/BungeeCore.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/de/steamwar/bungeecore/BungeeCore.java b/src/de/steamwar/bungeecore/BungeeCore.java index d6f6d947..76a9c0b9 100644 --- a/src/de/steamwar/bungeecore/BungeeCore.java +++ b/src/de/steamwar/bungeecore/BungeeCore.java @@ -31,6 +31,7 @@ import de.steamwar.bungeecore.listeners.mods.WorldDownloader; import de.steamwar.bungeecore.sql.SQL; import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.Team; +import net.dv8tion.jda.api.JDA; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.ProxyServer; @@ -158,6 +159,11 @@ public class BungeeCore extends Plugin { ErrorLogger.stop(); SQL.close(); SteamwarDiscordBot.instance().getJda().shutdownNow(); + try { + SteamwarDiscordBot.instance().getJda().awaitStatus(JDA.Status.SHUTDOWN); + } catch (Exception e) { + // Ignored + } } public static BungeeCore get() {