aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authoralexia <me@alexia.lol>2023-12-17 15:10:38 +0100
committerGitHub <noreply@github.com>2023-12-17 15:10:38 +0100
commitdd1a4e30aa07cc7a9eaf5ac3e33432bf9f4cd352 (patch)
tree55fabb32c98616462fbbfe86f3e9f2f5c710b97f /src/main/java
parent0179f24400b4364840ea4f42e2cc9d827a3c431f (diff)
downloadskyhanni-dd1a4e30aa07cc7a9eaf5ac3e33432bf9f4cd352.tar.gz
skyhanni-dd1a4e30aa07cc7a9eaf5ac3e33432bf9f4cd352.tar.bz2
skyhanni-dd1a4e30aa07cc7a9eaf5ac3e33432bf9f4cd352.zip
Add option to show if plot is not sprayed (#808)
Add option to show if plot is not sprayed. #808
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/SprayConfig.java9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/SprayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/SprayConfig.java
index 07f73ba78..eb8f6e9a7 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/SprayConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/SprayConfig.java
@@ -37,6 +37,15 @@ public class SprayConfig {
@Expose
@ConfigOption(
+ name = "Show If Not Sprayed",
+ desc = "Also show if current plot is not sprayed."
+ )
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean showNotSprayed = false;
+
+ @Expose
+ @ConfigOption(
name = "Spray Expiration Notice",
desc = "Show a notification in chat when a spray runs out in any plot. Only active in Garden."
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt
index 137db034e..c54e875ab 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt
@@ -31,7 +31,7 @@ class SprayDisplay {
display = plot.currentSpray?.let {
val timer = it.expiry.timeUntil()
"§eSprayed with §a${it.type.displayName} §7- ${timer.timerColor("§b")}${timer.format()}"
- }
+ } ?: if (config.showNotSprayed) "§cNot sprayed!" else ""
}
if (config.expiryNotification) {