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:
parent
7dcd574db1
commit
3e776a7fba
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user