aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt19
2 files changed, 11 insertions, 10 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 de86e01c4..52aaa8aed 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
@@ -83,7 +83,7 @@ public class HoppityEggsConfig {
public boolean warnUnclaimedEggs = false;
@Expose
- @ConfigOption(name = "Click to Warp", desc = "Make the eggs ready chat message clickable to warp you to an island.")
+ @ConfigOption(name = "Click to Warp", desc = "Make the eggs ready chat message & unclaimed timer display clickable to warp you to an island.")
@ConfigEditorBoolean
public boolean warpUnclaimedEggs = false;
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt
index 06948f27a..f09aa4eac 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt
@@ -72,14 +72,14 @@ object HoppityEggDisplayManager {
private fun updateDisplay(): List<Renderable> {
if (!HoppityEggsManager.isActive()) return emptyList()
- if (!HoppityEggsManager.config.showClaimedEggs) return emptyList()
- if (ReminderUtils.isBusy() && !HoppityEggsManager.config.showWhileBusy) return emptyList()
+ if (!config.showClaimedEggs) return emptyList()
+ if (ReminderUtils.isBusy() && !config.showWhileBusy) return emptyList()
val displayList =
HoppityEggType.entries.map { "§7 - ${it.formattedName} ${it.timeUntil().format()}" }.toMutableList()
displayList.add(0, "§bUnclaimed Eggs:")
- if (HoppityEggsManager.config.showCollectedLocationCount && LorenzUtils.inSkyBlock) {
+ if (config.showCollectedLocationCount && LorenzUtils.inSkyBlock) {
val totalEggs = HoppityEggLocations.islandLocations.size
if (totalEggs > 0) {
val collectedEggs = HoppityEggLocations.islandCollectedLocations.size
@@ -89,12 +89,13 @@ object HoppityEggDisplayManager {
}
if (displayList.size == 1) return emptyList()
+ val container = Renderable.verticalContainer(displayList.map(Renderable::string))
return listOf(
- Renderable.clickAndHover(
- Renderable.verticalContainer(displayList.map(Renderable::string)),
- tips = listOf("§eClick to ${"/warp ${HoppityEggsManager.config.warpDestination}".trim()}!"),
- onClick = { HypixelCommands.warp(HoppityEggsManager.config.warpDestination) },
- ),
+ if (config.warpUnclaimedEggs) Renderable.clickAndHover(
+ container,
+ tips = listOf("§eClick to ${"/warp ${config.warpDestination}".trim()}!"),
+ onClick = { HypixelCommands.warp(config.warpDestination) },
+ ) else container
)
}
@@ -102,7 +103,7 @@ object HoppityEggDisplayManager {
@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent) {
if (!HoppityEggsManager.isActive()) return
- HoppityEggsManager.config.position.renderRenderables(display, posLabel = "Hoppity Eggs")
+ config.position.renderRenderables(display, posLabel = "Hoppity Eggs")
}
private fun formatEggsCollected(collectedEggs: Int): String =