From 9750e1fe8ba9b30b9c1ce118a22f146acf83af31 Mon Sep 17 00:00:00 2001 From: TheMode Date: Thu, 19 Aug 2021 02:53:13 +0200 Subject: [PATCH] Synchronize child access --- src/main/java/net/minestom/server/event/EventNodeImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/event/EventNodeImpl.java b/src/main/java/net/minestom/server/event/EventNodeImpl.java index 58dc0103e..ad659117e 100644 --- a/src/main/java/net/minestom/server/event/EventNodeImpl.java +++ b/src/main/java/net/minestom/server/event/EventNodeImpl.java @@ -68,8 +68,8 @@ class EventNodeImpl implements EventNode { @Override public @NotNull List> findChildren(@NotNull String name, Class eventType) { - if (children.isEmpty()) return Collections.emptyList(); synchronized (GLOBAL_CHILD_LOCK) { + if (children.isEmpty()) return Collections.emptyList(); List> result = new ArrayList<>(); for (EventNode child : children) { if (equals(child, name, eventType)) {