From 897ae5fa3df2b448dd58ad0836fa143ba1bf5e87 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 17 Dec 2023 15:15:38 +0100 Subject: Changed pest spawn message format. --- .../at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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") } } -- cgit