aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-07-23 21:47:02 -0500
committeringlettronald <inglettronald@gmail.com>2023-07-23 21:47:02 -0500
commitc56059b6c9d28d17d82de090c5a0b9d9382cb82c (patch)
treeaa1f6b2c4798502c6f2ccafff788eb04f17c8379 /src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt
parentc36dd88ff83ff09d5941d6772b5eefff0cd10665 (diff)
downloadDulkirMod-Fabric-c56059b6c9d28d17d82de090c5a0b9d9382cb82c.tar.gz
DulkirMod-Fabric-c56059b6c9d28d17d82de090c5a0b9d9382cb82c.tar.bz2
DulkirMod-Fabric-c56059b6c9d28d17d82de090c5a0b9d9382cb82c.zip
Chat stacking with lots of refactor
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt')
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt b/src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt
index f956791..e584431 100644
--- a/src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt
+++ b/src/main/kotlin/com/dulkirfabric/features/chat/BridgeBotFormatter.kt
@@ -1,19 +1,17 @@
package com.dulkirfabric.features.chat
import com.dulkirfabric.config.DulkirConfig
-import com.dulkirfabric.events.chat.ChatReceivedEvent
+import com.dulkirfabric.events.chat.ChatEvents
import com.dulkirfabric.util.TextUtils
-import com.dulkirfabric.util.Utils
import meteordevelopment.orbit.EventHandler
import net.minecraft.text.Style
import net.minecraft.text.Text
-import net.minecraft.util.Formatting
object BridgeBotFormatter {
private val bridgeRegex: Regex = "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9][[A-Z]+])?§f: ([^>]+)(?: >| »|:) (.+)".toRegex()
@EventHandler
- fun onChat(event: ChatReceivedEvent) {
+ fun onChat(event: ChatEvents.AllowChat) {
if (!DulkirConfig.configOptions.bridgeFormatter) return
val message = event.message.string