diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-19 15:22:56 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-19 15:22:56 +0100 |
commit | 1aa908bfe97a057b3fba26e3052ef96cc451253c (patch) | |
tree | ebc4b6878ec2388316fd0e3db09e593521847ce1 /src/main | |
parent | c5affe08dafdd45c38ae4b8dcdc1087a624e1b38 (diff) | |
download | skyhanni-1aa908bfe97a057b3fba26e3052ef96cc451253c.tar.gz skyhanni-1aa908bfe97a057b3fba26e3052ef96cc451253c.tar.bz2 skyhanni-1aa908bfe97a057b3fba26e3052ef96cc451253c.zip |
Added support to always show jacob farming contest
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Garden.java | 10 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java index 34c24dbb2..acc7a7dcc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -406,13 +406,19 @@ public class Garden { public boolean nextJacobContest = false; @Expose - @ConfigOption(name = "Rng Drop Counter", desc = "Count RNG drops for Melon Dicer and Pumpkin Dicer.") + @ConfigOption(name = "Show Jacob Contest", desc = "Show the current or next jacob farming contest time and crops.") @ConfigEditorBoolean @ConfigAccordionId(id = 12) public boolean nextJacobContestDisplay = true; @Expose - @ConfigOption(name = "Dicer Counter Position", desc = "") + @ConfigOption(name = "Show everywhere", desc = "Show the timer not only in garden but everywhere in skyblock.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 12) + public boolean nextJacobContestEverywhere = false; + + @Expose + @ConfigOption(name = "Jacob Contest Position", desc = "") @ConfigEditorButton(runnableId = "nextJacobContest", buttonText = "Edit") @ConfigAccordionId(id = 12) public Position nextJacobContestPos = new Position(16, -232, false, true); diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt index dbf5ff5c8..ec50cc911 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt @@ -144,7 +144,8 @@ class GardenNextJacobContest { } val nextContest = - contests.filter { it.value.endTime > System.currentTimeMillis() }.toSortedMap().firstNotNullOfOrNull { it.value } + contests.filter { it.value.endTime > System.currentTimeMillis() }.toSortedMap() + .firstNotNullOfOrNull { it.value } if (nextContest == null) { if (contests.size == maxContestsPerYear) { list.add("§cNew SkyBlock Year! Open calendar again!") @@ -193,5 +194,6 @@ class GardenNextJacobContest { config.nextJacobContestPos.renderSingleLineWithItems(display) } - private fun isEnabled() = GardenAPI.inGarden() && config.nextJacobContestDisplay + private fun isEnabled() = LorenzUtils.inSkyBlock && config.nextJacobContestDisplay + && (GardenAPI.inGarden() || config.nextJacobContestEverywhere) }
\ No newline at end of file |