From 93abe90b1a7d0ce0009d6dcb1eb183f5f99af58b Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 5 Mar 2022 16:54:51 +0100 Subject: [PATCH] Fix exceptions Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/listeners/ConnectionListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/listeners/ConnectionListener.java b/src/de/steamwar/bungeecore/listeners/ConnectionListener.java index 9506ea2d..65855b39 100644 --- a/src/de/steamwar/bungeecore/listeners/ConnectionListener.java +++ b/src/de/steamwar/bungeecore/listeners/ConnectionListener.java @@ -23,6 +23,7 @@ import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.Message; import de.steamwar.bungeecore.Servertype; import de.steamwar.bungeecore.Subserver; +import de.steamwar.bungeecore.bot.config.SteamwarDiscordBotConfig; import de.steamwar.bungeecore.bot.util.DiscordRanks; import de.steamwar.bungeecore.commands.ChallengeCommand; import de.steamwar.bungeecore.commands.CheckCommand; @@ -96,7 +97,8 @@ public class ConnectionListener extends BasicListener { newPlayers.remove(player.getUniqueId()); } - DiscordRanks.update(user); + if(SteamwarDiscordBotConfig.loaded) + DiscordRanks.update(user); } /** To redirect players to the lobby in case of server closure. */