Skip to content

Commit cf58eee

Browse files
committed
[2.4.1] #543 #544
1 parent 8c76d96 commit cf58eee

5 files changed

Lines changed: 10 additions & 3 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ subprojects {
4141
// disableOnUnsupportedVersion = false
4242
}
4343
version {
44-
taboolib = "6.2.4-99fb800"
44+
taboolib = "6.2.4-e7fd043"
4545
coroutines = null
4646
}
4747
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=me.arasple.mc.trchat
2-
version=2.4.0
2+
version=2.4.1
33
kotlin.incremental=true
44
kotlin.incremental.java=true
55
kotlin.caching.enabled=true

project/runtime-bukkit/src/main/kotlin/me/arasple/mc/trchat/module/display/function/standard/Mention.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ object Mention : Function("MENTION") {
4949
@ConfigNode("General.Mention.Cooldown", "function.yml")
5050
val cooldown = ConfigNodeTransfer<String, Long> { parseMillis() }
5151

52+
@ConfigNode("General.Mention.Pattern", "function.yml")
53+
val pattern = "@? ?(names)"
54+
5255
override fun createVariable(sender: Player, message: String): String {
5356
if (!enabled) {
5457
return message
@@ -91,7 +94,7 @@ object Mention : Function("MENTION") {
9194
?.sortedByDescending { it.length }
9295
?.joinToString("|") { Regex.escape(it) }
9396
?: return null
94-
return Regex("@? ?($names)", RegexOption.IGNORE_CASE)
97+
return Regex(pattern.replace("(names)", "($names)"), RegexOption.IGNORE_CASE)
9598
}
9699

97100
}

project/runtime-bukkit/src/main/kotlin/me/arasple/mc/trchat/module/internal/data/ChatLogs.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ object ChatLogs {
3535
@Schedule(delay = (20 * 15).toLong(), period = (20 * 60 * 5).toLong(), async = true)
3636
@Awake(LifeCycle.DISABLE)
3737
fun writeToFile() {
38+
if (waveList.isEmpty()) {
39+
return
40+
}
3841
val logFile = newFile(File(getDataFolder(), "logs"), "${dateFormat0.format(System.currentTimeMillis())}.txt", create = true)
3942
try {
4043
waveList.forEach { line ->

project/runtime-bukkit/src/main/resources/function.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ General:
1212
Permission: 'none'
1313
Cooldown: '30s'
1414
Notify: true
15+
Pattern: '@? ?(names)'
1516
Action: [ ]
1617
Mention-All:
1718
Enabled: true

0 commit comments

Comments
 (0)