Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v0.7' into v0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeGodSRC committed Dec 28, 2024
2 parents 0da9aaa + e291f09 commit 0c69f2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ To achieve this it's nearly impossible for a single person or a small team, that
- RaytraceAntiXray - [SpigotMC](https://www.spigotmc.org/resources/raytraceantixray-ores-entities-tiles.116253/), [BuiltByBit](https://builtbybit.com/resources/raytraceantixray-ores-entities-tiles.41896/)
- CraftGens - [BuiltByBit](https://builtbybit.com/resources/craftgens-generators-gui-editor.30062/)
- Brew - [GitHub](https://github.com/FairyProject/brew)
- legacy-lands-library - [GitHub](https://github.com/LegacyLands/legacy-lands-library)
- *Feel free to open a PR to add your project to here!*

## Getting Started
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
Expand Down Expand Up @@ -122,7 +123,11 @@ private CompletableFuture<Object> findPrototypeInstance(Class<?> type) {
private CompletableFuture<?> callPreInitProcessors() {
List<CompletableFuture<?>> futures = new ArrayList<>();

for (InstanceEntry entry : this.collection) {
// fix ConcurrentModificationException
List<InstanceEntry> snapshot = new ArrayList<>();
this.collection.forEach(snapshot::add);

for (InstanceEntry entry : snapshot) {
Object instance = entry.getInstance();
ContainerObj object = entry.getContainerObject();
if (!this.trySetLifeCycle(object, LifeCycle.PRE_INIT))
Expand Down

0 comments on commit 0c69f2c

Please sign in to comment.