aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-17 15:15:38 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-17 15:15:38 +0100
commit897ae5fa3df2b448dd58ad0836fa143ba1bf5e87 (patch)
tree718559f10ad3b03aae7648444b019412c0126cc0 /src/main/java/at
parentdd1a4e30aa07cc7a9eaf5ac3e33432bf9f4cd352 (diff)
downloadskyhanni-897ae5fa3df2b448dd58ad0836fa143ba1bf5e87.tar.gz
skyhanni-897ae5fa3df2b448dd58ad0836fa143ba1bf5e87.tar.bz2
skyhanni-897ae5fa3df2b448dd58ad0836fa143ba1bf5e87.zip
Changed pest spawn message format.
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
index c48a77c9c..52d530131 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.garden.pests.PestSpawnEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.utils.ConfigUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.StringUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.seconds
@@ -46,16 +47,15 @@ class PestSpawn {
private fun pestSpawn(amount: Int, plotName: String) {
PestSpawnEvent(amount, plotName).postAndCatch()
+ val pestName = StringUtils.canBePlural(amount, "Pest", "Pests")
+ val message = "§e$amount §a$pestName Spawned in §b$plotName§a!"
if (config.showTitle) {
- LorenzUtils.sendTitle("§aPest Spawn! §e$amount §ain §b$plotName§a!", 7.seconds)
+ LorenzUtils.sendTitle(message, 7.seconds)
}
if (config.chatMessageFormat == PestSpawnConfig.ChatMessageFormatEntry.COMPACT) {
- LorenzUtils.clickableChat(
- "§aPest Spawn! §e$amount §ain §b$plotName§a!",
- "tptoplot $plotName"
- )
+ LorenzUtils.clickableChat(message, "tptoplot $plotName")
}
}