Removed stream usage from World.

This commit is contained in:
MobiusDevelopment
2023-01-08 18:23:24 +00:00
parent c399e6bd1f
commit ab238e9895
3 changed files with 21 additions and 3 deletions

View File

@@ -294,7 +294,13 @@ public class World
{
_nextPrivateStoreUpdate = currentTime + Config.STORE_REVIEW_CACHE_TIME;
_allStoreModeBuySellPlayers.clear();
_allPlayers.values().stream().filter(Player::isInStoreSellOrBuyMode).forEach(player -> _allStoreModeBuySellPlayers.put(player.getObjectId(), player));
for (Player player : _allPlayers.values())
{
if (player.isInStoreSellOrBuyMode())
{
_allStoreModeBuySellPlayers.put(player.getObjectId(), player);
}
}
}
return _allStoreModeBuySellPlayers.values();
}

View File

@@ -290,7 +290,13 @@ public class World
{
_nextPrivateStoreUpdate = currentTime + Config.STORE_REVIEW_CACHE_TIME;
_allStoreModeBuySellPlayers.clear();
_allPlayers.values().stream().filter(Player::isInStoreSellOrBuyMode).forEach(player -> _allStoreModeBuySellPlayers.put(player.getObjectId(), player));
for (Player player : _allPlayers.values())
{
if (player.isInStoreSellOrBuyMode())
{
_allStoreModeBuySellPlayers.put(player.getObjectId(), player);
}
}
}
return _allStoreModeBuySellPlayers.values();
}

View File

@@ -290,7 +290,13 @@ public class World
{
_nextPrivateStoreUpdate = currentTime + Config.STORE_REVIEW_CACHE_TIME;
_allStoreModeBuySellPlayers.clear();
_allPlayers.values().stream().filter(Player::isInStoreSellOrBuyMode).forEach(player -> _allStoreModeBuySellPlayers.put(player.getObjectId(), player));
for (Player player : _allPlayers.values())
{
if (player.isInStoreSellOrBuyMode())
{
_allStoreModeBuySellPlayers.put(player.getObjectId(), player);
}
}
}
return _allStoreModeBuySellPlayers.values();
}