diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java index d7fe0e11..0cf48fd5 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/EcoEnchant.java @@ -162,6 +162,11 @@ public abstract class EcoEnchant extends Enchantment implements Listener, Watche } this.update(); + + if (!this.isEnabled() && this.getPlugin().getConfigYml().getBool("advanced.hard-disable.enabled")) { + return; + } + EcoEnchants.addNewEcoEnchant(this); } diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index 2de4088d..fddf263c 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -124,4 +124,9 @@ advanced: aggressive: false # Aggressive mode converts all items in all inventories whenever revealed. # This may impact performance. - force: false # If **all** items should have hide enchants removed - absolute last ditch effort, most likely to break other things. \ No newline at end of file + force: false # If **all** items should have hide enchants removed - absolute last ditch effort, most likely to break other things. + hard-disable: + # Fixes potential problems with other plugins where the enchantments are still present when disabled. + # Enabling this prevents the enchantments from being registered with the server at all when disabled. + # There may be some unknown problems with this, but will fix bugs with plugins such as Slimefun. + enabled: false \ No newline at end of file