Skip to content

Commit

Permalink
Fix ConcurrentModificationException
Browse files Browse the repository at this point in the history
I don't know, if that's the best way to fix it, but the error seems to
be gone.
  • Loading branch information
Xitee committed Jul 17, 2022
1 parent 3bf6c05 commit 94e3fb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/de/xite/scoreboard/modules/board/ScoreboardManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ public void run() {
int i = scores.size()-id-1;
currentScores.replace(id, score);

for(Player p : players)
List<Player> all = new ArrayList<Player>();
all.addAll(players);
for(Player p : all)
ScoreTitleUtils.setScore(p, score, i, true, get(name)); // set the score

if(count >= scores.get(id).size()-1) {
Expand Down

0 comments on commit 94e3fb0

Please sign in to comment.