diff --git a/EssentialsDiscord/src/main/java/net/essentialsx/discord/JDADiscordService.java b/EssentialsDiscord/src/main/java/net/essentialsx/discord/JDADiscordService.java index ebc023d8b9d..2843e55af2b 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 void updateTypesRelay() { 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());