Concurrent Modification Fix (#73)

Co-authored-by: iam <iam4722202468@users.noreply.github.com>
This commit is contained in:
hapily04 2023-11-19 10:52:06 -06:00 committed by GitHub
parent e146a9393e
commit eaf3d5311c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
}