From 0be71908e7eeaedf492ddcf680ac110fd658cfbe Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Fri, 10 Apr 2020 15:49:20 +0200 Subject: [PATCH] Actually setup requirements --- .../main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java index 61488ff6..e241cda5 100644 --- a/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java +++ b/api/src/main/java/de/erethon/dungeonsxl/api/dungeon/GameRule.java @@ -235,7 +235,9 @@ public class GameRule { 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.");