aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt14
2 files changed, 11 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt
index 300f8805b..851adb45d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt
@@ -29,13 +29,14 @@ class Translator {
// Logic for listening for a user click on a chat message is from NotEnoughUpdates
@SubscribeEvent(priority = EventPriority.LOWEST)
- fun onGuiChat(e: LorenzChatEvent) {
+ fun onGuiChat(event: LorenzChatEvent) {
if (!SkyHanniMod.feature.chat.translator) return
- val message = e.message
+ val message = event.message
if (message.getPlayerName() == "-") return
- val editedComponent = if (e.chatComponent.siblings.size > 0) e.chatComponent.siblings.last() else e.chatComponent
+ val editedComponent =
+ if (event.chatComponent.siblings.size > 0) event.chatComponent.siblings.last() else event.chatComponent
val clickStyle = createClickStyle(message.removeColor(), editedComponent.chatStyle)
editedComponent.setChatStyle(clickStyle)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt
index 6c0be90d3..390ed408e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt
@@ -22,17 +22,17 @@ import kotlin.time.Duration.Companion.seconds
class HighlightBonzoMasks {
private val config get() = SkyHanniMod.feature.itemAbilities
- val maskTimers = mutableMapOf<String, CooldownTimer>()
+ private val maskTimers = mutableMapOf<String, CooldownTimer>()
// Technically this timer is overestimating since mage level affects the cooldown, however I don't care.
- val bonzoMaskCooldown = 360.seconds
- val bonzoMaskMessage = "^Your (.*Bonzo's Mask) saved your life!$".toRegex()
+ private val bonzoMaskCooldown = 360.seconds
+ private val bonzoMaskMessage = "^Your (.*Bonzo's Mask) saved your life!$".toRegex()
- val spiritMaskCooldown = 30.seconds
- val spiritMaskMessage = "^Second Wind Activated! Your Spirit Mask saved your life!$".toRegex()
+ private val spiritMaskCooldown = 30.seconds
+ private val spiritMaskMessage = "^Second Wind Activated! Your Spirit Mask saved your life!$".toRegex()
- val greenHue = Color.RGBtoHSB(0, 255, 0, null)[0].toDouble()
- val redHue = Color.RGBtoHSB(255, 0, 0, null)[0].toDouble()
+ private val greenHue = Color.RGBtoHSB(0, 255, 0, null)[0].toDouble()
+ private val redHue = Color.RGBtoHSB(255, 0, 0, null)[0].toDouble()
@SubscribeEvent
fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) {