Fix DistanceTrigger CME; resolvse #834

This commit is contained in:
Daniel Saukel 2020-06-28 00:44:56 +02:00
parent e4ad18e4ba
commit 970527e903

View File

@ -74,7 +74,7 @@ public class DistanceTrigger extends Trigger {
return;
}
for (Trigger trigger : gameWorld.getTriggers()) {
for (Trigger trigger : gameWorld.getTriggers().toArray(new Trigger[gameWorld.getTriggers().size()])) {
if (trigger instanceof DistanceTrigger) {
DistanceTrigger distanceTrigger = (DistanceTrigger) trigger;
if (player.getLocation().distance(distanceTrigger.loc) < distanceTrigger.distance) {