From a9aa6ceb34a6d5edfd7e830d06ce5e2a3bc21bea Mon Sep 17 00:00:00 2001 From: kforbro Date: Mon, 3 Apr 2023 19:50:30 +0300 Subject: [PATCH] pretty lore with `global-bottom-lore` --- .../willfp/ecoshop/shop/gui/ShopItemSlot.kt | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/gui/ShopItemSlot.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/gui/ShopItemSlot.kt index c4b6639..88ddb39 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/gui/ShopItemSlot.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/gui/ShopItemSlot.kt @@ -66,6 +66,14 @@ class ShopItemSlot( ) } + addLoreLines( + item.bottomLore.formatEco(player) + ) + + if (item.isBuyable) { + addLoreLines(plugin.configYml.getStrings("shop-items.global-bottom-lore.buy").formatEco(player)) + } + if (item.isShowingQuickBuySell) { if (item.isBuyable && item.getMaxBuysAtOnce(player) > item.buyAmount) { if (item.hasAltBuy) { @@ -86,7 +94,13 @@ class ShopItemSlot( ) } } + } + if (item.isSellable) { + addLoreLines(plugin.configYml.getStrings("shop-items.global-bottom-lore.sell").formatEco(player)) + } + + if (item.isShowingQuickBuySell) { if (item.isSellable) { addLoreLines( plugin.langYml.getStrings("quick-sell") @@ -94,18 +108,6 @@ class ShopItemSlot( } } - addLoreLines( - item.bottomLore.formatEco(player) - ) - - if (item.isBuyable) { - addLoreLines(plugin.configYml.getStrings("shop-items.global-bottom-lore.buy").formatEco(player)) - } - - if (item.isSellable) { - addLoreLines(plugin.configYml.getStrings("shop-items.global-bottom-lore.sell").formatEco(player)) - } - addLoreLines(plugin.configYml.getStrings("shop-items.global-bottom-lore.always").formatEco(player)) } }) {