bane mechanic complete - working

This commit is contained in:
2025-01-03 20:53:08 -06:00
parent 1926deb7f9
commit afa68b840c
+2 -4
View File
@@ -1062,14 +1062,12 @@ public class City extends AbstractWorldObject {
} }
private void onExitBane() { private void onExitBane() {
Iterator<Integer> iterator = this.baneAttendees.keySet().iterator();
ArrayList<Integer> toRemove = new ArrayList<>(); ArrayList<Integer> toRemove = new ArrayList<>();
while (iterator.hasNext()) { for (Integer uuid : this.baneAttendees.keySet()) {
Integer uuid = iterator.next();
if (!_playerMemory.contains(uuid)) { if (!_playerMemory.contains(uuid)) {
long timeGone = System.currentTimeMillis() - this.baneAttendees.get(uuid).longValue(); long timeGone = System.currentTimeMillis() - this.baneAttendees.get(uuid).longValue();
if (timeGone > 180000L) { // 3 minutes if (timeGone > 180000L) { // 3 minutes
toRemove.add(uuid); toRemove.add(uuid); // Mark for removal
} }
} }
} }