1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

changed to enhanced for loop

This commit is contained in:
Jeffrey Kosse 2022-10-17 07:53:49 +02:00
parent 7dcd574db1
commit 3e776a7fba

View File

@ -100,14 +100,7 @@ public class TickerTask implements Runnable {
} }
// Fixes #2576 - Remove any deleted instances of BlockStorage // Fixes #2576 - Remove any deleted instances of BlockStorage
Iterator<BlockStorage> worlds = Slimefun.getRegistry().getWorlds().values().iterator(); Slimefun.getRegistry().getWorlds().values().removeIf(BlockStorage::isMarkedForRemoval);
while (worlds.hasNext()) {
BlockStorage storage = worlds.next();
if (storage.isMarkedForRemoval()) {
worlds.remove();
}
}
// Run our ticker code // Run our ticker code
if (!halted) { if (!halted) {