From e2c459b4334504ef708ac6feca7f7be3faf6630f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 2 Apr 2023 19:17:45 +0200 Subject: 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) --- .../hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer') 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 -- cgit