This commit is contained in:
2024-12-03 17:17:29 +01:00
parent 677eb4137a
commit 19a4d0e93a
8 changed files with 79 additions and 79 deletions
@@ -48,7 +48,7 @@ class DealerInventory(val player: Player): SWInventoryHolder() {
val team = TNTLeagueGame.getTeam(player) ?: return@to
if (team.coins < price) {
message.send("notEnoughCoins", player)
message.send("NOT_ENOUGH_COINS", player)
player.playSound(Sound.sound(org.bukkit.Sound.ENTITY_VILLAGER_HURT.key, net.kyori.adventure.sound.Sound.Source.MASTER, 1f, 1f))
return@to
}
@@ -59,7 +59,7 @@ class DealerInventory(val player: Player): SWInventoryHolder() {
}
}
override fun createInventory(): Inventory = plugin.server.createInventory(this, ceil(TNTLeagueConfig.config.prices.size / 9f).toInt() * 9, Component.text(message.parse("dealer", player)))
override fun createInventory(): Inventory = plugin.server.createInventory(this, ceil(TNTLeagueConfig.config.prices.size / 9f).toInt() * 9, Component.text(message.parse("DEALER", player)))
companion object {
private val priceKey = NamespacedKey(plugin, "price")