From 280de8bd1e446f7a18949c4cb0e4ec4efea76e99 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 29 Apr 2021 08:44:22 +0100 Subject: [PATCH] Added option to disable re-registering vanilla enchantments --- .../enchantments/support/vanilla/VanillaEnchantments.java | 5 +++-- eco-core/core-plugin/src/main/resources/vanillaenchants.yml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/vanilla/VanillaEnchantments.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/vanilla/VanillaEnchantments.java index 933f60b9..5f750ba5 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/vanilla/VanillaEnchantments.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/vanilla/VanillaEnchantments.java @@ -61,7 +61,8 @@ public class VanillaEnchantments { MAP.clear(); MAP.putAll(map); - - ProxyUtils.getProxy(EcoCraftEnchantmentManagerProxy.class).registerNewCraftEnchantments(); + if (PLUGIN.getVanillaEnchantsYml().getBool("enabled")) { + ProxyUtils.getProxy(EcoCraftEnchantmentManagerProxy.class).registerNewCraftEnchantments(); + } } } diff --git a/eco-core/core-plugin/src/main/resources/vanillaenchants.yml b/eco-core/core-plugin/src/main/resources/vanillaenchants.yml index 4c79feb2..7b3facb6 100644 --- a/eco-core/core-plugin/src/main/resources/vanillaenchants.yml +++ b/eco-core/core-plugin/src/main/resources/vanillaenchants.yml @@ -1,6 +1,7 @@ # # Allows for modifying certain aspects of vanilla enchantments # +enabled: false # There may be potential conflicts if modifying vanilla enchantments. # Set custom max levels for vanilla enchantments. # To do this, add each enchantment like this: