From 5c25c2a97d2d0ef9ea41f59a63e7397f6da3af3f Mon Sep 17 00:00:00 2001 From: liv Date: Mon, 28 Dec 2020 18:59:27 -0500 Subject: [PATCH] [fix] PlayerDetector in MessageDetection not working --- .../java/me/zeroeightsix/kami/util/text/MessageDetection.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/util/text/MessageDetection.kt b/src/main/java/me/zeroeightsix/kami/util/text/MessageDetection.kt index f6ac395c4..f9f805618 100644 --- a/src/main/java/me/zeroeightsix/kami/util/text/MessageDetection.kt +++ b/src/main/java/me/zeroeightsix/kami/util/text/MessageDetection.kt @@ -36,7 +36,7 @@ object MessageDetection { } }, OTHER { - private val regex = "^<(\\w)>".toRegex() + private val regex = "^<(\\w+)>".toRegex() override fun detect(input: CharSequence) = playerName(input) != null @@ -45,7 +45,7 @@ object MessageDetection { } }, ANY { - private val regex = "^<(\\w)>".toRegex() + private val regex = "^<(\\w+)>".toRegex() override fun detect(input: CharSequence) = input.contains(regex) @@ -79,4 +79,4 @@ object MessageDetection { BARITONE("^\\[B(aritone)?]".toRegex()), TPA_REQUEST("^\\w+? (has requested|wants) to teleport to you\\.".toRegex()) } -} \ No newline at end of file +}