aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-03-25 04:36:31 -0500
committeringlettronald <inglettronald@gmail.com>2023-03-25 04:36:31 -0500
commit43d07fc791e63bba61695e0d4b766b78eb699132 (patch)
tree69111eb055f0e68fdf388046fb0812f4f3f2f004 /src/main/kotlin/dulkirmod/features/chat/Bridge.kt
parent71af70d22e9a55a58c36642a745e81aa91851375 (diff)
downloadDulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.gz
DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.bz2
DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.zip
Config Syntax Change and switch to oneconfig
Diffstat (limited to 'src/main/kotlin/dulkirmod/features/chat/Bridge.kt')
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/Bridge.kt20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
index 83efb98..245fe22 100644
--- a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
@@ -1,6 +1,6 @@
package dulkirmod.features.chat
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.Utils
import net.minecraft.util.ChatComponentText
import net.minecraft.util.EnumChatFormatting
@@ -16,12 +16,12 @@ object Bridge {
fun handle(event: ClientChatReceivedEvent) {
val message = event.message.unformattedText
- if (guildFormat matches message && Config.bridgeBot) {
+ if (guildFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = guildFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
@@ -32,12 +32,12 @@ object Bridge {
}
// OTHER FORMAT
- else if (alternateFormat matches message && Config.bridgeBot) {
+ else if (alternateFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = alternateFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
@@ -47,12 +47,12 @@ object Bridge {
}
}
- else if (otherAltFormat matches message && Config.bridgeBot) {
+ else if (otherAltFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = otherAltFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)