@@ -2,35 +2,26 @@ import com.google.gson.JsonObject
22import com.lambda.client.LambdaMod
33import com.lambda.client.command.CommandManager
44import com.lambda.client.event.events.ConnectionEvent
5- import com.lambda.client.module.Category
6- import com.lambda.client.plugin.api.PluginModule
7-
85import com.lambda.client.event.events.PacketEvent
9- import com.lambda.client.manager.managers.FriendManager
10- import com.lambda.client.manager.managers.MessageManager
11- import com.lambda.client.manager.managers.MessageManager.newMessageModifier
12- import com.lambda.client.mixin.extension.textComponent
6+ import com.lambda.client.module.Category
137import com.lambda.client.module.modules.chat.ChatTimestamp
8+ import com.lambda.client.plugin.api.PluginModule
149import com.lambda.client.util.TickTimer
1510import com.lambda.client.util.TimeUnit
1611import com.lambda.client.util.text.MessageDetection
1712import com.lambda.client.util.text.MessageSendHelper
18- import com.lambda.client.util.text.MessageSendHelper.sendServerMessage
19- import com.lambda.client.util.text.format
2013import com.lambda.client.util.text.formatValue
2114import com.lambda.client.util.threads.defaultScope
2215import com.lambda.client.util.threads.safeListener
2316import com.lambda.commons.utils.ConnectionUtils
24- import com.lambda.commons.utils.SystemUtils
2517import com.lambda.event.listener.listener
2618import kotlinx.coroutines.Dispatchers
2719import kotlinx.coroutines.launch
2820import net.minecraft.network.play.server.SPacketChat
29- import net.minecraft.util.text.TextFormatting
3021import net.minecraftforge.fml.common.gameevent.TickEvent
3122import org.apache.commons.io.IOUtils
3223
33- internal object ChatPlusDiscordNotifs: PluginModule(
24+ internal object ChatPlusDiscordNotifs : PluginModule(
3425 name = " DiscordNotifs" ,
3526 category = Category .CHAT ,
3627 description = " Sends your chat to a set Discord channel" ,
@@ -78,14 +69,18 @@ internal object ChatPlusDiscordNotifs: PluginModule(
7869 /* Always on status code */
7970 safeListener<TickEvent .ClientTickEvent > {
8071 if (url.value == " unchanged" ) {
81- MessageSendHelper .sendErrorMessage(chatName + " You must first set a webhook url with the " +
82- formatValue(" ${CommandManager .prefix} discordnotifs" ) +
83- " command" )
72+ MessageSendHelper .sendErrorMessage(
73+ chatName + " You must first set a webhook url with the " +
74+ formatValue(" ${CommandManager .prefix} discordnotifs" ) +
75+ " command"
76+ )
8477 disable()
8578 } else if (pingID.value == " unchanged" && importantPings) {
86- MessageSendHelper .sendErrorMessage(chatName + " For Pings to work, you must set a Discord ID with the " +
87- formatValue(" ${CommandManager .prefix} discordnotifs" ) +
88- " command" )
79+ MessageSendHelper .sendErrorMessage(
80+ chatName + " For Pings to work, you must set a Discord ID with the " +
81+ formatValue(" ${CommandManager .prefix} discordnotifs" ) +
82+ " command"
83+ )
8984 disable()
9085 }
9186 }
@@ -115,7 +110,8 @@ internal object ChatPlusDiscordNotifs: PluginModule(
115110 || message == " LambdaMessageType2"
116111 || direct && MessageDetection .Direct .ANY detect message
117112 || restart && MessageDetection .Server .RESTART detect message
118- || importantPings && MessageDetection .Server .QUEUE_IMPORTANT detect message) formatPingID()
113+ || importantPings && MessageDetection .Server .QUEUE_IMPORTANT detect message
114+ ) formatPingID()
119115 else " "
120116
121117 private fun formatPingID (): String {
0 commit comments