mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 20:05:02 -04:00
fix ConcurrentModificationException in Connection::fireEvent
This commit is contained in:
parent
b089ffb4a4
commit
5c1278fb72
@ -193,7 +193,9 @@ public class Connection {
|
|||||||
*/
|
*/
|
||||||
public boolean fireEvent(ConnectionEvent connectionEvent) {
|
public boolean fireEvent(ConnectionEvent connectionEvent) {
|
||||||
Minosoft.EVENT_MANAGERS.forEach((eventManager -> eventManager.getGlobalEventListeners().forEach((method) -> method.invoke(connectionEvent))));
|
Minosoft.EVENT_MANAGERS.forEach((eventManager -> eventManager.getGlobalEventListeners().forEach((method) -> method.invoke(connectionEvent))));
|
||||||
this.eventListeners.forEach((method -> method.invoke(connectionEvent)));
|
synchronized (this.eventListeners) {
|
||||||
|
this.eventListeners.forEach((method -> method.invoke(connectionEvent)));
|
||||||
|
}
|
||||||
if (connectionEvent instanceof CancelableEvent cancelableEvent) {
|
if (connectionEvent instanceof CancelableEvent cancelableEvent) {
|
||||||
return cancelableEvent.isCancelled();
|
return cancelableEvent.isCancelled();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user