Skip to content

Commit

Permalink
Fix ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Nov 22, 2023
1 parent 38c6f89 commit 748277f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.inventory.Inventory;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArrayList;

public class PlayerManager {

Expand All @@ -42,7 +41,7 @@ public class PlayerManager {

private WrappedTask lastEntityTask;

private static final List<PlayerManager> players = Collections.synchronizedList(new ArrayList<>());
private static final List<PlayerManager> players = new CopyOnWriteArrayList<>();

public final boolean saveUserData = config.getBoolean(Config.SAVED_USER_DATA);

Expand Down

0 comments on commit 748277f

Please sign in to comment.