From ebe9bb639bb0fd892dacbf7e2b03f7ac5e76f6c2 Mon Sep 17 00:00:00 2001 From: xbaimiao <3104026189@qq.com> Date: Sun, 18 Aug 2024 20:44:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- gradle.properties | 2 +- .../com/github/xbaimiao/shoppro/core/shop/ShopImpl.kt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f70d316..b90b84f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,7 +20,7 @@ taboolib { name("xbaimiao") } val bukkitNodes = bukkitNodes as MutableMap - bukkitNodes["update-info"] = "限制商店购买点击频率为200ms一次(防止连点器)" + bukkitNodes["update-info"] = "修复提示信息错误" } env { install(NMS_UTIL, UI) diff --git a/gradle.properties b/gradle.properties index 1b4d7f4..0b21834 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ group=com.github.xbaimiao.shoppro -version=1.3.2-SNAPSHOT +version=1.3.3-SNAPSHOT diff --git a/src/main/kotlin/com/github/xbaimiao/shoppro/core/shop/ShopImpl.kt b/src/main/kotlin/com/github/xbaimiao/shoppro/core/shop/ShopImpl.kt index 47225ea..bae76b3 100644 --- a/src/main/kotlin/com/github/xbaimiao/shoppro/core/shop/ShopImpl.kt +++ b/src/main/kotlin/com/github/xbaimiao/shoppro/core/shop/ShopImpl.kt @@ -221,7 +221,7 @@ class ShopImpl(private val configuration: Configuration) : Shop() { Bukkit.getPluginManager().callEvent(ShopProBuyEvent(item, amount, player)) ShopPro.database.addAmount(item, player, LimitData(amount.toLong(), 0L)) item.exeCommands(player, amount) - player.sendLang("buy-item", amount, item.name, item.price * amount) + player.sendLang("buy-item", amount, item.name, String.format("%.2f", item.price * amount)) ShopPro.config.getString("the_voice_of_success")?.let { player.playSound(player.location, it, 100f, 1f) } @@ -272,7 +272,7 @@ class ShopImpl(private val configuration: Configuration) : Shop() { } } Bukkit.getPluginManager().callEvent(ShopProSellEvent(shopItem, amount, player)) - player.sendLang("sell-item", amount, shopItem.name, shopItem.price * amount) + player.sendLang("sell-item", amount, shopItem.name, String.format("%.2f", shopItem.price * amount)) ShopPro.config.getString("the_voice_of_success")?.let { player.playSound(player.location, it, 100f, 1f) } @@ -317,7 +317,7 @@ class ShopImpl(private val configuration: Configuration) : Shop() { item.currency.giveMoney(player, item.price * amount) Bukkit.getPluginManager().callEvent(ShopProSellEvent(item, amount, player)) ShopPro.database.addAmount(item, player, LimitData(0L, amount.toLong())) - player.sendLang("sell-item", amount, item.name, item.price * amount) + player.sendLang("sell-item", amount, item.name, String.format("%.2f", item.price * amount)) ShopPro.config.getString("the_voice_of_success")?.let { player.playSound(player.location, it, 100f, 1f) }