mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +00:00
Fix ping handler regex
This commit is contained in:
1 parent
72cd93ff04
commit
513e3d005f
1 file changed
+1
-1
@@ -82,7 +82,7 @@ public class PingHandler implements Listener {
|
|||||||
|
|
||||||
return message.replaceText(TextReplacementConfig.builder()
|
return message.replaceText(TextReplacementConfig.builder()
|
||||||
// \B(@Username|@Displayname)\b
|
// \B(@Username|@Displayname)\b
|
||||||
.match(Pattern.compile(String.format("\\B(%1$2s%2$2s|%1$2s%3$2s)\\b", prefix, recipient.username(), displayName), Pattern.CASE_INSENSITIVE))
|
.match(Pattern.compile(String.format("\\B%1$s(%2$s|%3$s)\\b", prefix, recipient.username(), displayName), Pattern.CASE_INSENSITIVE))
|
||||||
.replacement(matchedText -> {
|
.replacement(matchedText -> {
|
||||||
if (this.configFactory.primaryConfig().pings().playSound()) {
|
if (this.configFactory.primaryConfig().pings().playSound()) {
|
||||||
recipient.playSound(this.configFactory.primaryConfig().pings().sound());
|
recipient.playSound(this.configFactory.primaryConfig().pings().sound());
|
||||||
|
|||||||
Reference in new issue
Block a user