diff --git a/src/main/java/me/petterim1/discordchat/PlayerListener.java b/src/main/java/me/petterim1/discordchat/PlayerListener.java index 354c009..e58e3c0 100644 --- a/src/main/java/me/petterim1/discordchat/PlayerListener.java +++ b/src/main/java/me/petterim1/discordchat/PlayerListener.java @@ -38,7 +38,7 @@ public void onDeath(PlayerDeathEvent e) { return; } if (Loader.config.getBoolean("spamFilter")) { - API.sendMessage(Loader.config.getString("info_player_death").replace("%death_message%", msg.replace("@", "[at]").replaceAll("(?i)https:", "").replaceAll("(?i)http:", "").replace("discord.gg", ""))); + API.sendMessage(Loader.config.getString("info_player_death").replace("@", "[at]").replaceAll("(?i)https:", "").replaceAll("(?i)http:", "").replace("discord.gg", "").replace("discordapp.com", ""))); } else { API.sendMessage(Loader.config.getString("info_player_death").replace("%death_message%", msg)); } @@ -53,7 +53,7 @@ public void onChat(PlayerChatEvent e) { String message = e.getMessage(); String name = e.getPlayer().getName(); if (Loader.config.getBoolean("spamFilter")) { - message = message.replace("@", "[at]").replaceAll("(?i)https:", "").replaceAll("(?i)http:", ""); + message = message.replace("@", "[at]").replaceAll("(?i)https:", "").replaceAll("(?i)http:", "").replace("discord.gg", "").replace("discordapp.com", ""); } API.sendMessage(TextFormat.clean(Loader.config.getString("minecraftToDiscordChatFormatting")).replace("%timestamp%", new Date(System.currentTimeMillis()).toString()).replace("%username%", name).replace("%displayname%", e.getPlayer().getDisplayName()).replace("%message%", message)); }