aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-26 11:53:06 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-26 11:53:06 +0100
commit7a52f2c5c9515acd04ca711dc7d97301227f3c4c (patch)
treebe03ac6d1cc1eca71f41627bd8c114213d09fd3e /src/main/java
parent2803f83266d8e75ed9f2a52b0b96027aed9b7b30 (diff)
downloadskyhanni-7a52f2c5c9515acd04ca711dc7d97301227f3c4c.tar.gz
skyhanni-7a52f2c5c9515acd04ca711dc7d97301227f3c4c.tar.bz2
skyhanni-7a52f2c5c9515acd04ca711dc7d97301227f3c4c.zip
fixed formatting
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt
index f31e4e3a3..96e2de239 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt
@@ -15,19 +15,20 @@ class SprayFeatures {
private var display: String? = null
private var lastChangeTime = SimpleTimeMark.farPast()
+ // TODO repo
+ private val pattern = "§a§lSPRAYONATOR! §r§7Your selected material is now §r§a(?<spray>.*)§r§7!".toPattern()
+
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!config.pestWhenSelector) return
- val pattern = "§a§lSPRAYONATOR! §r§7Your selected material is now §r§a(?<spray>.*)§r§7!".toPattern()
-
val type = pattern.matchMatcher(event.message) {
val sprayName = group("spray")
SprayType.getByName(sprayName) ?: error("unknown spray: '$sprayName'")
} ?: return
- val pests = type.getPests().joinToString("§7, ", prefix = "§6") { it.displayName }
- display = "§a${type.displayName} §7($pests§7)"
+ val pests = type.getPests().joinToString("§7, §6") { it.displayName }
+ display = "§a${type.displayName} §7(§6$pests§7)"
lastChangeTime = SimpleTimeMark.now()