diff options
author | IlmarsXd <ilmars500@gmail.com> | 2023-03-21 17:37:12 +0200 |
---|---|---|
committer | IlmarsXd <ilmars500@gmail.com> | 2023-03-21 17:37:12 +0200 |
commit | 623f260e2f1d586336fca13dc86bf2ffb0c6565c (patch) | |
tree | d54f367541619b80ae1863f5acb3d9f09de7bada /src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt | |
parent | e7723d5ff52da94eb65992b5bdd9c5bb316d5959 (diff) | |
download | DulkirMod-623f260e2f1d586336fca13dc86bf2ffb0c6565c.tar.gz DulkirMod-623f260e2f1d586336fca13dc86bf2ffb0c6565c.tar.bz2 DulkirMod-623f260e2f1d586336fca13dc86bf2ffb0c6565c.zip |
refactor modules
Diffstat (limited to 'src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt index b3113bd..8bcd145 100644 --- a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt +++ b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt @@ -3,9 +3,10 @@ package dulkirmod.features import dulkirmod.DulkirMod import dulkirmod.config.Config import dulkirmod.utils.TabListUtils +import dulkirmod.utils.TitleUtils import dulkirmod.utils.Utils -class GardenVisitorAlert { +object GardenVisitorAlert { private var hasSentAlert = false private var lastAlert = 0 @@ -19,7 +20,7 @@ class GardenVisitorAlert { if (TabListUtils.maxVisitors && !hasSentAlert) { val color = Utils.getColorString(Config.bestiaryNotifColor) - DulkirMod.titleUtils.drawStringForTime("${color}Max Visitors", 5000) + TitleUtils.drawStringForTime("${color}Max Visitors", 5000) DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f) DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f) DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f) @@ -32,7 +33,7 @@ class GardenVisitorAlert { if (TabListUtils.maxVisitors && hasSentAlert && timeSinceLastAlert > 5000 && Config.persistentAlert) { lastAlert = System.currentTimeMillis().toInt() val color = Utils.getColorString(Config.bestiaryNotifColor) - DulkirMod.titleUtils.drawStringForTime("${color}Max Visitors", 5000) + TitleUtils.drawStringForTime("${color}Max Visitors", 5000) DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f) DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f) DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f) |