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() {