From e5aacc2ef80b8f8d4ef45c1f06b7e0a738be66ea Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sat, 21 Nov 2020 12:03:53 +0000 Subject: [PATCH] Fixed storing null targets --- .../willfp/ecoenchants/config/configs/EnchantmentConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java b/Plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java index 529b7310..d33e80e8 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/config/configs/EnchantmentConfig.java @@ -93,8 +93,10 @@ public class EnchantmentConfig extends EnchantmentYamlConfig { Set targets = new HashSet<>(); targetNames.forEach((s -> { - if(EnchantmentTarget.getByName(s) == null) + if(EnchantmentTarget.getByName(s) == null) { Logger.error(s + " is an invalid target!"); + return; + } targets.add(EnchantmentTarget.getByName(s)); }));