Fix ClassCastException

This commit is contained in:
Daniel Saukel 2016-07-01 15:57:21 +02:00
parent 85dfd046c2
commit 8d80f5731a

View File

@ -77,10 +77,9 @@ public class WaveTrigger extends Trigger {
*/
public static Set<WaveTrigger> getByGameWorld(DGameWorld gameWorld) {
Set<WaveTrigger> toReturn = new HashSet<>();
for (Trigger trigger : gameWorld.getTriggers()) {
for (Trigger trigger : gameWorld.getTriggers(TriggerTypeDefault.WAVE)) {
toReturn.add((WaveTrigger) trigger);
}
return toReturn;
}