diff --git a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java index ede5d5bc..43e49e82 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java +++ b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java @@ -357,15 +357,18 @@ public abstract class EcoPlugin extends JavaPlugin { Eco.getHandler().registerBStats(this); } - Set enabledPlugins = Arrays.stream(Bukkit.getPluginManager().getPlugins()).map(Plugin::getName).collect(Collectors.toSet()); + Set enabledPlugins = Arrays.stream(Bukkit.getPluginManager().getPlugins()) + .map(Plugin::getName) + .map(String::toLowerCase) + .collect(Collectors.toSet()); - if (enabledPlugins.contains("PlaceholderAPI")) { + if (enabledPlugins.contains("PlaceholderAPI".toLowerCase())) { this.loadedIntegrations.add("PlaceholderAPI"); PlaceholderManager.addIntegration(Eco.getHandler().createPAPIIntegration(this)); } this.loadIntegrationLoaders().forEach((integrationLoader -> { - if (enabledPlugins.contains(integrationLoader.getPluginName())) { + if (enabledPlugins.contains(integrationLoader.getPluginName().toLowerCase())) { this.loadedIntegrations.add(integrationLoader.getPluginName()); integrationLoader.load(); } diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/shop/ShopWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/shop/ShopWrapper.java index 6a37799c..310380e7 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/integrations/shop/ShopWrapper.java +++ b/eco-api/src/main/java/com/willfp/eco/core/integrations/shop/ShopWrapper.java @@ -1,9 +1,11 @@ package com.willfp.eco.core.integrations.shop; +import com.willfp.eco.core.integrations.Integration; + /** * Wrapper class for shop integrations. */ -public interface ShopWrapper { +public interface ShopWrapper extends Integration { /** * Register eco item provider for shop plugins. */ diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/EcoSpigotPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/EcoSpigotPlugin.kt index 9265e956..54f70783 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/EcoSpigotPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/EcoSpigotPlugin.kt @@ -89,6 +89,7 @@ abstract class EcoSpigotPlugin : EcoPlugin( override fun handleAfterLoad() { CustomItemsManager.registerAllItems() + ShopManager.registerEcoProvider() } override fun loadIntegrationLoaders(): List { @@ -124,7 +125,7 @@ abstract class EcoSpigotPlugin : EcoPlugin( IntegrationLoader("ItemsAdder") { CustomItemsManager.register(CustomItemsItemsAdder(this)) }, // Shop - IntegrationLoader("ShopGuiPlus") { ShopManager.register(ShopShopGuiPlus()) }, + IntegrationLoader("ShopGUIPlus") { ShopManager.register(ShopShopGuiPlus()) }, // Misc IntegrationLoader("mcMMO") { McmmoManager.register(McmmoIntegrationImpl()) } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/shop/ShopShopGuiPlus.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/shop/ShopShopGuiPlus.kt index 52aad4cd..0da98d8f 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/shop/ShopShopGuiPlus.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/shop/ShopShopGuiPlus.kt @@ -28,4 +28,8 @@ class ShopShopGuiPlus : ShopWrapper { return Items.getCustomItem(itemStack1)?.key == Items.getCustomItem(itemStack2)?.key } } + + override fun getPluginName(): String { + return "ShopGUIPlus" + } } \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index 16db5d9c..dc030099 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -21,7 +21,7 @@ softdepend: - PlaceholderAPI - mcMMO - CombatLogX - - ShopGuiPlus + - ShopGUIPlus - ItemsAdder - Oraxen - HeadDatabase diff --git a/gradle.properties b/gradle.properties index 82dd60f7..94f7921b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 6.7.3 +version = 6.7.4 plugin-name = eco \ No newline at end of file