aboutsummaryrefslogtreecommitdiff
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
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)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt11
2 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java b/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
index 0338f713c..eb9bd078a 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
@@ -95,4 +95,9 @@ public class Slayer {
@ConfigOption(name = "Quest Warning", desc = "Warning when wrong slayer quest is selected, or killing mobs for the wrong slayer.")
@ConfigEditorBoolean
public boolean questWarning = true;
+
+ @Expose
+ @ConfigOption(name = "Quest Warning Title", desc = "Sends a Title when warning.")
+ @ConfigEditorBoolean
+ public boolean questWarningTitle = true;
}
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