forked from 2009Scape/Server
Fixed a concurrent modification exception in event dispatch
This commit is contained in:
parent
97c7e7e3d4
commit
8dadaa5089
1 changed files with 2 additions and 1 deletions
|
|
@ -162,7 +162,8 @@ public abstract class Entity extends Node {
|
|||
{
|
||||
if(this.hooks.containsKey(event.getClass()))
|
||||
{
|
||||
this.hooks.get(event.getClass()).forEach((hook) -> { hook.process(this, event); });
|
||||
ArrayList<EventHook> processList = new ArrayList(this.hooks.get(event.getClass()));
|
||||
processList.forEach((hook) -> { hook.process(this, event); });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue