9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2026-01-04 15:41:40 +00:00
This commit is contained in:
Auxilor
2022-11-09 12:56:15 +00:00
parent dfed5b996a
commit 0cf2d4c810

View File

@@ -134,10 +134,8 @@ class ActivatorSlot(
val price = menu.getReforgeStatus(player).price val price = menu.getReforgeStatus(player).price
menu.callEvent(player, ReforgePriceChangeEvent())
if (!price.canAfford(player)) { if (!price.canAfford(player)) {
player.sendMessage(plugin.langYml.getMessage("cannot-afford-price")) player.sendMessage(plugin.langYml.getMessage("cannot-afford-price").replace("%price%", price.getDisplay(player)))
if (plugin.configYml.getBool("gui.cannot-afford-sound.enabled")) { if (plugin.configYml.getBool("gui.cannot-afford-sound.enabled")) {
PlayableSound.create( PlayableSound.create(
@@ -176,6 +174,8 @@ class ActivatorSlot(
1f, plugin.configYml.getDouble("gui.sound.pitch").toFloat() 1f, plugin.configYml.getDouble("gui.sound.pitch").toFloat()
) )
} }
menu.callEvent(player, ReforgePriceChangeEvent())
} }
} }