diff --git a/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java b/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java index a7bbf965..ebaa5bea 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java +++ b/core/src/main/java/de/erethon/dungeonsxl/trigger/ProgressTrigger.java @@ -29,8 +29,6 @@ import org.bukkit.Bukkit; */ public class ProgressTrigger extends Trigger { - private TriggerType type = TriggerTypeDefault.PROGRESS; - private DResourceWorld floor; private int floorCount; private int waveCount; @@ -102,7 +100,7 @@ public class ProgressTrigger extends Trigger { @Override public TriggerType getType() { - return type; + return TriggerTypeDefault.PRESENCE; } /* Statics */ @@ -126,8 +124,10 @@ public class ProgressTrigger extends Trigger { public static Set getByGameWorld(DGameWorld gameWorld) { Set toReturn = new HashSet<>(); - for (Trigger trigger : gameWorld.getTriggers(TriggerTypeDefault.PROGRESS)) { - toReturn.add((ProgressTrigger) trigger); + for (Trigger trigger : gameWorld.getTriggers()) { + if (trigger instanceof ProgressTrigger) { + toReturn.add((ProgressTrigger) trigger); + } } return toReturn; } diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java b/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java index 37334f94..a16331a5 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DGameWorld.java @@ -363,9 +363,8 @@ public class DGameWorld extends DInstanceWorld implements GameWorld { continue; } - for (de.erethon.dungeonsxl.api.Trigger apiTrigger : sign.getTriggers()) { - Trigger trigger = (Trigger) apiTrigger; - if (trigger.getType() == TriggerTypeDefault.PROGRESS) { + for (de.erethon.dungeonsxl.api.Trigger trigger : sign.getTriggers()) { + if (trigger instanceof ProgressTrigger) { if (((ProgressTrigger) trigger).getFloorCount() > getGame().getFloorCount()) { break signs; }