remove player formn cityoutlaws when they leave

This commit is contained in:
2023-05-07 12:34:01 -05:00
parent 0c9bb0d948
commit 526fe799f6
+4 -2
View File
@@ -1081,8 +1081,6 @@ public class City extends AbstractWorldObject {
// so store it in a temporary collection // so store it in a temporary collection
toRemove.add(playerUUID); toRemove.add(playerUUID);
if(cityOutlaws.contains(playerUUID))
cityOutlaws.remove(playerUUID);
// ***For debugging // ***For debugging
// Logger.info("PlayerMemory for ", this.getCityName() + ": " + _playerMemory.size()); // Logger.info("PlayerMemory for ", this.getCityName() + ": " + _playerMemory.size());
} }
@@ -1090,6 +1088,10 @@ public class City extends AbstractWorldObject {
// Remove players from city memory // Remove players from city memory
_playerMemory.removeAll(toRemove); _playerMemory.removeAll(toRemove);
for(Integer removalUUID : toRemove){
if(this.cityOutlaws.contains(removalUUID))
this.cityOutlaws.remove(removalUUID);
}
} }
public int getWarehouseBuildingID() { public int getWarehouseBuildingID() {