mirror of https://github.com/kami-blue/client
[fix] PlayerDetector in MessageDetection not working
This commit is contained in:
parent
f180ad82db
commit
5c25c2a97d
|
@ -36,7 +36,7 @@ object MessageDetection {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
OTHER {
|
OTHER {
|
||||||
private val regex = "^<(\\w)>".toRegex()
|
private val regex = "^<(\\w+)>".toRegex()
|
||||||
|
|
||||||
override fun detect(input: CharSequence) = playerName(input) != null
|
override fun detect(input: CharSequence) = playerName(input) != null
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ object MessageDetection {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ANY {
|
ANY {
|
||||||
private val regex = "^<(\\w)>".toRegex()
|
private val regex = "^<(\\w+)>".toRegex()
|
||||||
|
|
||||||
override fun detect(input: CharSequence) = input.contains(regex)
|
override fun detect(input: CharSequence) = input.contains(regex)
|
||||||
|
|
||||||
|
@ -79,4 +79,4 @@ object MessageDetection {
|
||||||
BARITONE("^\\[B(aritone)?]".toRegex()),
|
BARITONE("^\\[B(aritone)?]".toRegex()),
|
||||||
TPA_REQUEST("^\\w+? (has requested|wants) to teleport to you\\.".toRegex())
|
TPA_REQUEST("^\\w+? (has requested|wants) to teleport to you\\.".toRegex())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue