From afa68b840c31fda2b824a3d1c74c41bd777bd1ae Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 3 Jan 2025 20:53:08 -0600 Subject: [PATCH] bane mechanic complete - working --- src/engine/objects/City.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index da4771d6..71788c26 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -1062,14 +1062,12 @@ public class City extends AbstractWorldObject { } private void onExitBane() { - Iterator iterator = this.baneAttendees.keySet().iterator(); ArrayList toRemove = new ArrayList<>(); - while (iterator.hasNext()) { - Integer uuid = iterator.next(); + for (Integer uuid : this.baneAttendees.keySet()) { if (!_playerMemory.contains(uuid)) { long timeGone = System.currentTimeMillis() - this.baneAttendees.get(uuid).longValue(); if (timeGone > 180000L) { // 3 minutes - toRemove.add(uuid); + toRemove.add(uuid); // Mark for removal } } }