better regex

This commit is contained in:
dowoge 2023-06-21 00:42:07 -04:00
parent 3d790e9d55
commit 2f823a9916

View File

@ -66,7 +66,7 @@ public class Events implements Listener {
DiscordWebhook Webhook = new DiscordWebhook(webhookURL);
Webhook.setContent('<' + player.getName() + "> " + message.replaceAll("(<?[@|#]&?.+>?)","`$1`"));
Webhook.setContent('<' + player.getName() + "> " + message.replaceAll("(<[@#]\\S+>|@\\S+|#\\S+)","`$1`"));
try {
Webhook.execute();