diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-26 11:53:06 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-26 11:53:06 +0100 |
commit | 7a52f2c5c9515acd04ca711dc7d97301227f3c4c (patch) | |
tree | be03ac6d1cc1eca71f41627bd8c114213d09fd3e /src/main | |
parent | 2803f83266d8e75ed9f2a52b0b96027aed9b7b30 (diff) | |
download | skyhanni-7a52f2c5c9515acd04ca711dc7d97301227f3c4c.tar.gz skyhanni-7a52f2c5c9515acd04ca711dc7d97301227f3c4c.tar.bz2 skyhanni-7a52f2c5c9515acd04ca711dc7d97301227f3c4c.zip |
fixed formatting
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt | 9 |
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() |