From a0aea29b1b74f4783af8d433def2cf02a7966648 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 4 Mar 2022 23:46:21 +0100 Subject: [PATCH] Fix discord bot loading --- src/de/steamwar/bungeecore/BungeeCore.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/BungeeCore.java b/src/de/steamwar/bungeecore/BungeeCore.java index 20b9b46..84b020a 100644 --- a/src/de/steamwar/bungeecore/BungeeCore.java +++ b/src/de/steamwar/bungeecore/BungeeCore.java @@ -172,10 +172,12 @@ public class BungeeCore extends Plugin { @Override public void onDisable(){ - try { - SteamwarDiscordBot.instance().getJda().shutdown(); - } catch (Throwable e) { - getLogger().log(Level.SEVERE, "Could not shutdown discord bot", e); + if (SteamwarDiscordBotConfig.loaded) { + try { + SteamwarDiscordBot.instance().getJda().shutdown(); + } catch (Throwable e) { + getLogger().log(Level.SEVERE, "Could not shutdown discord bot", e); + } } errorLogger.unregister();