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) }