From 81426795bd803a6716d6f9e824ac2ff60f80781e Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 2 Apr 2021 12:43:43 +0100 Subject: [PATCH] Removed deprecated config getters --- .../ecoenchants/enchantments/util/EnchantmentUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantmentUtils.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantmentUtils.java index cee6e3cf..dc109087 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantmentUtils.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantmentUtils.java @@ -59,7 +59,7 @@ public class EnchantmentUtils { ) ); - enchantment.getConfig().getConfig().getKeys(true).forEach(string -> { + enchantment.getConfig().getKeys(true).forEach(string -> { String key = string.replace("\\.", "_").replace("-", "_"); Object object = enchantment.getConfig().getConfig().get(string); @@ -71,7 +71,7 @@ public class EnchantmentUtils { ); }); - if (enchantment.getConfig().getConfig().get(EcoEnchants.CONFIG_LOCATION + "chance-per-level") != null) { + if (enchantment.getConfig().getRaw(EcoEnchants.CONFIG_LOCATION + "chance-per-level") != null) { PlaceholderManager.registerPlaceholder( new PlaceholderEntry( enchantment.getPermissionName() + "_" + "chance_per_level", @@ -80,7 +80,7 @@ public class EnchantmentUtils { ); } - if (enchantment.getConfig().getConfig().get(EcoEnchants.CONFIG_LOCATION + "multiplier") != null) { + if (enchantment.getConfig().getRaw(EcoEnchants.CONFIG_LOCATION + "multiplier") != null) { PlaceholderManager.registerPlaceholder( new PlaceholderEntry( enchantment.getPermissionName() + "_" + "multiplier",