diff --git a/EssentialsDiscord/src/main/java/net/essentialsx/discord/JDADiscordService.java b/EssentialsDiscord/src/main/java/net/essentialsx/discord/JDADiscordService.java index ebc023d8b..2843e55af 100644 --- a/EssentialsDiscord/src/main/java/net/essentialsx/discord/JDADiscordService.java +++ b/EssentialsDiscord/src/main/java/net/essentialsx/discord/JDADiscordService.java @@ -383,11 +383,10 @@ public class JDADiscordService implements DiscordService, IEssentialsModule { final Webhook webhook = DiscordUtil.getOrCreateWebhook(channel, DiscordUtil.ADVANCED_RELAY_NAME).join(); if (webhook == null) { - final WrappedWebhookClient current = channelIdToWebhook.get(channel.getId()); + final WrappedWebhookClient current = channelIdToWebhook.remove(channel.getId()); if (current != null) { current.close(); } - channelIdToWebhook.remove(channel.getId()).close(); continue; } typeToChannelId.put(type, channel.getId());