aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt')
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
index ff747eb..c572db0 100644
--- a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
@@ -6,15 +6,15 @@ import dulkirmod.utils.Utils
import net.minecraftforge.client.event.ClientChatReceivedEvent
object ThrottleNotif {
- private var lastThrottle : Long = 0
+ private var lastThrottle: Long = 0
fun handle(event: ClientChatReceivedEvent, unformatted: String) {
if (unformatted == "This menu has been throttled! Please slow down..." && DulkirMod.config.throttleNotifier
- && Utils.isInDungeons()) {
+ && Utils.isInDungeons()
+ ) {
event.isCanceled = true;
if (!Config.throttleNotifierSpam && System.currentTimeMillis() - lastThrottle > 8000) {
DulkirMod.mc.thePlayer.sendChatMessage("/pc " + DulkirMod.config.customMessage)
- }
- else {
+ } else {
DulkirMod.mc.thePlayer.sendChatMessage("/pc " + DulkirMod.config.customMessage)
}
lastThrottle = System.currentTimeMillis()