Actually setup requirements

This commit is contained in:
Daniel Saukel 2020-04-10 15:49:20 +02:00
parent 05fbb76e79
commit 0be71908e7

View File

@ -235,7 +235,9 @@ public class GameRule<V> {
continue;
}
}
requirements.add((Requirement) constructor.newInstance(api));
Requirement requirement = (Requirement) constructor.newInstance(api);
requirement.setup(section);
requirements.add(requirement);
} catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException
| IllegalArgumentException | InvocationTargetException exception) {
MessageUtil.log(api, "&4Requirement \"" + key + "\" is not implemented properly with a (DungeonsAPI) constructor.");