aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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")
}
}