aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/dulkirmod/features/MatchoAlert.kt')
-rw-r--r--src/main/kotlin/dulkirmod/features/MatchoAlert.kt33
1 files changed, 9 insertions, 24 deletions
diff --git a/src/main/kotlin/dulkirmod/features/MatchoAlert.kt b/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
index c140036..db51a48 100644
--- a/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
+++ b/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
@@ -13,31 +13,16 @@ class MatchoAlert {
if (!Config.notifyMatcho) return
if (!Utils.isInSkyblock()) return
- val scoreboardList: List<String?> = TabListUtils.fetchTabEntires().map {
- it.displayName?.unformattedText
+ if (TabListUtils.area != "Crimson Isle") {
+ hasSentAlert = false
}
- var explo = false
- for (s in scoreboardList) {
- if (explo) {
- // This line is status of Volcano
- if (s != " INACTIVE" && !hasSentAlert) {
- val color = Utils.getColorString(Config.bestiaryNotifColor)
- DulkirMod.titleUtils.drawStringForTime("${color}Matcho", 5000)
- if (Config.bestiaryAlertSounds)
- DulkirMod.mc.thePlayer.playSound("mob.villager.yes", 1f * Config.bestiaryNotifVol, 0f)
- hasSentAlert = true
- } else if (s == " INACTIVE") hasSentAlert = false
- break
- }
- if (s == "Volcano Explosivity:")
- explo = true
- if (s != null) {
- if (s.contains("Area:") && !s.contains("Crimson Isle")) {
- hasSentAlert = false
- break
- }
- }
- }
+ if (TabListUtils.explosivity && !hasSentAlert) {
+ val color = Utils.getColorString(Config.bestiaryNotifColor)
+ DulkirMod.titleUtils.drawStringForTime("${color}Matcho", 5000)
+ if (Config.bestiaryAlertSounds)
+ DulkirMod.mc.thePlayer.playSound("mob.villager.yes", 1f * Config.bestiaryNotifVol, 0f)
+ hasSentAlert = true
+ } else if (!TabListUtils.explosivity) hasSentAlert = false
}
} \ No newline at end of file