aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt22
2 files changed, 21 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java
index 5306cf967..e56633f42 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java
@@ -42,4 +42,10 @@ public class HoppityEggsConfig {
@ConfigEditorBoolean
@FeatureToggle
public boolean highlightHoppityShop = true;
+
+ @Expose
+ @ConfigOption(name = "Time im Chat", desc = "Show in chat when using Egglocator that show next hoppity event or next egg time.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean timeInChat = true;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt
index 1702a9667..25160cf51 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt
@@ -70,15 +70,21 @@ object HoppityEggsManager {
noEggsLeftPattern.matchMatcher(event.message) {
HoppityEggType.allFound()
- val nextEgg = HoppityEggType.entries.minByOrNull { it.timeUntil() } ?: return
- event.chatComponent.appendText("\n§eNext egg available in §b${nextEgg.timeUntil().format()}")
+ if (config.timeInChat) {
+ val nextEgg = HoppityEggType.entries.minByOrNull { it.timeUntil() } ?: return
+ ChatUtils.chat("§eNext egg available in §b${nextEgg.timeUntil().format()}")
+ event.blockedReason = "hoppity_egg"
+ }
return
}
eggAlreadyCollectedPattern.matchMatcher(event.message) {
getEggType(event).markClaimed()
- val nextEgg = HoppityEggType.entries.minByOrNull { it.timeUntil() } ?: return
- event.chatComponent.appendText("\n§eNext egg available in §b${nextEgg.timeUntil().format()}")
+ if (config.timeInChat) {
+ val nextEgg = HoppityEggType.entries.minByOrNull { it.timeUntil() } ?: return
+ ChatUtils.chat("§eNext egg available in §b${nextEgg.timeUntil().format()}")
+ event.blockedReason = "hoppity_egg"
+ }
return
}
@@ -89,9 +95,12 @@ object HoppityEggsManager {
hoppityEventNotOn.matchMatcher(event.message) {
val currentYear = SkyBlockTime.now().year
- val timeUntil = SkyBlockTime(currentYear + 1).asTimeMark().timeUntil()
- event.chatComponent.appendText("\n§eNext Hoppity's Hunt in §b${timeUntil.format()}")
+ if (config.timeInChat) {
+ val timeUntil = SkyBlockTime(currentYear + 1).asTimeMark().timeUntil()
+ ChatUtils.chat("§eHoppity's Hunt not active. Next Hoppity's Hunt event in §b${timeUntil.format()}")
+ event.blockedReason = "hoppity_egg"
+ }
return
}
}
@@ -150,5 +159,4 @@ object HoppityEggsManager {
event.move(44, "event.chocolateFactory.hoppityEggs", "event.hoppityEggs")
}
-
}