aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/slayer
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-02 19:17:45 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-02 19:17:45 +0200
commite2c459b4334504ef708ac6feca7f7be3faf6630f (patch)
treec80fa1dfb2d441629b92585056a839763a5998fa /src/main/java/at/hannibal2/skyhanni/features/slayer
parentc644a443188ba929b54a6d79d64540e3f16f0c14 (diff)
downloadskyhanni-e2c459b4334504ef708ac6feca7f7be3faf6630f.tar.gz
skyhanni-e2c459b4334504ef708ac6feca7f7be3faf6630f.tar.bz2
skyhanni-e2c459b4334504ef708ac6feca7f7be3faf6630f.zip
Added an extra toggle to disable the quest warning title (which is sent to you if you haven't activated auto-slayer or are farming combat exp for the wrong slayer)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
index 16ae900a5..d699b04e1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
@@ -16,7 +16,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
class SlayerQuestWarning {
-
+ private val config get() = SkyHanniMod.feature.slayer
private var needSlayerQuest = false
private var lastWarning = 0L
private var currentReason = ""
@@ -118,7 +118,7 @@ class SlayerQuestWarning {
@SubscribeEvent
fun onWorldChange(event: WorldEvent.Load) {
- if (!SkyHanniMod.feature.slayer.questWarning) return
+ if (!config.questWarning) return
if (!needSlayerQuest) {
dirtySidebar = true
@@ -135,7 +135,10 @@ class SlayerQuestWarning {
lastWarning = System.currentTimeMillis()
LorenzUtils.chat("§e[SkyHanni] $chatMessage")
- SendTitleHelper.sendTitle("§e$titleMessage", 2_000)
+
+ if (config.questWarningTitle) {
+ SendTitleHelper.sendTitle("§e$titleMessage", 2_000)
+ }
}
@SubscribeEvent
@@ -170,6 +173,6 @@ class SlayerQuestWarning {
}
private fun isEnabled(): Boolean {
- return LorenzUtils.inSkyBlock && SkyHanniMod.feature.slayer.questWarning
+ return LorenzUtils.inSkyBlock && config.questWarning
}
} \ No newline at end of file