diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/ShopItem.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/ShopItem.kt index 23f9880..3572546 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/ShopItem.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoshop/shop/ShopItem.kt @@ -43,12 +43,6 @@ class ShopItem( val commands = config.getStrings("command") + config.getStrings("commands") - val sellCommand = config.getStringsOrNull("sell.sell-commands") - - val sellItemMessage = config.getStringsOrNull("sell.sell-message") - - val buyItemMessage = config.getStringsOrNull("buy.buy-message") - val item = if (config.has("item")) Items.lookup(config.getString("item")) else null val buyAmount = config.getIntOrNull("buy.amount") ?: 1 @@ -111,6 +105,12 @@ class ShopItem( 0 ) + private val sellCommands: List? = config.getStringsOrNull("sell.sell-commands") + + private val sellItemMessage: List? = config.getStringsOrNull("sell.sell-message") + + private val buyItemMessage: List? = config.getStringsOrNull("buy.buy-message") + init { if (this.item != null && this.item.item.amount != 1) { throw InvalidShopItemException( @@ -367,8 +367,8 @@ class ShopItem( shop?.sellSound?.playTo(player) - if (sellCommand != null) { - for (command in sellCommand) { + if (sellCommands != null) { + for (command in sellCommands) { Bukkit.dispatchCommand( Bukkit.getConsoleSender(), command.replace("%player%", player.name) diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index 1736e90..ab3658e 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -6,6 +6,13 @@ authors: [ Auxilor ] website: willfp.com depend: - eco +softdepend: + - EcoEnchants + - EcoBosses + - Talismans + - StatTrackers + - EcoItems + - Reforges commands: ecoshop: