mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-05 02:09:48 +01:00
Fix legacy ProgressTrigger references
This commit is contained in:
parent
74a879212c
commit
b35000358f
@ -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,9 +124,11 @@ public class ProgressTrigger extends Trigger {
|
||||
|
||||
public static Set<ProgressTrigger> getByGameWorld(DGameWorld gameWorld) {
|
||||
Set<ProgressTrigger> toReturn = new HashSet<>();
|
||||
for (Trigger trigger : gameWorld.getTriggers(TriggerTypeDefault.PROGRESS)) {
|
||||
for (Trigger trigger : gameWorld.getTriggers()) {
|
||||
if (trigger instanceof ProgressTrigger) {
|
||||
toReturn.add((ProgressTrigger) trigger);
|
||||
}
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user