Concurrent Modification Fix (#73)

Co-authored-by: iam <iam4722202468@users.noreply.github.com>
(cherry picked from commit eaf3d5311c)
This commit is contained in:
hapily04 2023-11-19 10:52:06 -06:00 committed by Matt Worzala
parent b7e3b40147
commit 066eeda6dd

View File

@ -96,7 +96,8 @@ final class EntityView {
public void forManuals(@NotNull Consumer<Player> consumer) {
synchronized (mutex) {
this.manualViewers.forEach(consumer);
Set<Player> manualViewersCopy = Set.copyOf(this.manualViewers);
manualViewersCopy.forEach(consumer);
}
}