diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/shop/ShopEconomyShopGUI.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/shop/ShopEconomyShopGUI.kt index 683c0a8c..a212c6fd 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/shop/ShopEconomyShopGUI.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/shop/ShopEconomyShopGUI.kt @@ -36,22 +36,22 @@ class ShopEconomyShopGUI : ShopIntegration { object EconomyShopGUISellEventListeners : Listener { private val sellTypes = listOf( - Transaction.Type.SELL_GUI_SCREEN, - Transaction.Type.SELL_SCREEN, - Transaction.Type.SELL_ALL_SCREEN, - Transaction.Type.SELL_ALL_COMMAND, - Transaction.Type.QUICK_SELL, - Transaction.Type.AUTO_SELL_CHEST, + "SELL_GUI_SCREEN", + "SELL_SCREEN", + "SELL_ALL_SCREEN", + "SELL_ALL_COMMAND", + "QUICK_SELL", + "AUTO_SELL_CHEST", ) private val sellAllTypes = listOf( - Transaction.Type.SELL_GUI_SCREEN, - Transaction.Type.SELL_ALL_COMMAND, + "SELL_GUI_SCREEN", + "SELL_ALL_COMMAND", ) @EventHandler fun shopEventToEcoEvent(event: PreTransactionEvent) { - if (event.transactionType !in sellTypes) { + if (event.transactionType.name.uppercase() !in sellTypes) { return } @@ -59,7 +59,7 @@ class ShopEconomyShopGUI : ShopIntegration { return } - val prices = if (event.transactionType in sellAllTypes) { + val prices = if (event.transactionType.name.uppercase() in sellAllTypes) { event.items!! } else { mapOf(event.shopItem to event.amount) diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index eec5dd8e..3c0c79e2 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -45,6 +45,7 @@ softdepend: - ExecutableItems - RPGHorses - EconomyShopGUI + - EconomyShopGUI-Premium - zShop - DeluxeSellwands - Scyther