- gui now configurable per rank
- fix item requirement
This commit is contained in:
okx-code
2020-04-10 13:01:05 +01:00
parent 1cd507d836
commit c553ee0462
72 changed files with 499 additions and 226 deletions
+8 -1
View File
@@ -25,8 +25,15 @@ public class RankList<T extends Rank> {
for (Map.Entry<String, Object> entry : config.getValues(false).entrySet()) {
ConfigurationSection rankSection = (ConfigurationSection) entry.getValue();
validateSection(rankSection);
ranks.add(deserializer.apply(rankSection));
T apply = deserializer.apply(rankSection);
if (apply != null) {
ranks.add(apply);
}
}
List<T> ordered = getOrderedList();
Set<T> provisionalRanks = new HashSet<>(ordered);
this.ranks.clear();
this.ranks.addAll(provisionalRanks);
}
protected void validateSection(ConfigurationSection section) {