From 526fe799f6f72820b5c551f09174422e892d0441 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 7 May 2023 12:34:01 -0500 Subject: [PATCH] remove player formn cityoutlaws when they leave --- src/engine/objects/City.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index 8ebf5cb0..c9675795 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -1081,8 +1081,6 @@ public class City extends AbstractWorldObject { // so store it in a temporary collection toRemove.add(playerUUID); - if(cityOutlaws.contains(playerUUID)) - cityOutlaws.remove(playerUUID); // ***For debugging // Logger.info("PlayerMemory for ", this.getCityName() + ": " + _playerMemory.size()); } @@ -1090,6 +1088,10 @@ public class City extends AbstractWorldObject { // Remove players from city memory _playerMemory.removeAll(toRemove); + for(Integer removalUUID : toRemove){ + if(this.cityOutlaws.contains(removalUUID)) + this.cityOutlaws.remove(removalUUID); + } } public int getWarehouseBuildingID() {