hopefully fixed concurrent modification

This commit is contained in:
NEZNAMY committed 2020-08-06 14:48:45 +02:00
1 parent 36d0a4162d
commit 00a6357ac2
1 file changed
+1 -1
@@ -152,7 +152,7 @@ public class PlaceholderManager implements QuitEventListener {
}
Shared.placeholderCpu.addTime(relPlaceholder.identifier, System.nanoTime()-startTime);
}
for (Placeholder placeholder : Placeholders.usedPlaceholders) {
for (Placeholder placeholder : new HashSet<>(Placeholders.usedPlaceholders)) { //avoiding concurrent modification on reload
if (loopTime % placeholder.cooldown != 0) continue;
// System.out.println(placeholder.getIdentifier() + " - " + placeholder.cooldown);
if (placeholder instanceof PlayerPlaceholder) {