Skip to content

Commit

Permalink
Fix multiple command section keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wertik committed Aug 15, 2022
1 parent 81e4329 commit 16f5c1e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,16 @@ public static PresetRewards load(@Nullable ConfigurationSection section, BlockPr
@NotNull
private static List<String> 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<>();
Expand Down

0 comments on commit 16f5c1e

Please sign in to comment.