diff --git a/blockregen-plugin/src/main/java/nl/aurorion/blockregen/system/preset/struct/PresetRewards.java b/blockregen-plugin/src/main/java/nl/aurorion/blockregen/system/preset/struct/PresetRewards.java index 174b0dc8..21c06334 100644 --- a/blockregen-plugin/src/main/java/nl/aurorion/blockregen/system/preset/struct/PresetRewards.java +++ b/blockregen-plugin/src/main/java/nl/aurorion/blockregen/system/preset/struct/PresetRewards.java @@ -79,11 +79,16 @@ public static PresetRewards load(@Nullable ConfigurationSection section, BlockPr @NotNull private static List getStringOrList(ConfigurationSection section, String... keys) { for (String key : keys) { + + if (section.get(key) == null) { + continue; + } + if (section.isList(key)) { return section.getStringList(key); - } else { + } else if (section.isString(key)) { String str = section.getString(key); - return str == null ? new ArrayList<>() : Collections.singletonList(str); + return Collections.singletonList(str); } } return new ArrayList<>();