mirror of
https://code.chipmunk.land/ChomeNS/chipmunkmod.git
synced 2026-03-30 22:51:58 +00:00
fix: use cow arraylist for listeners or get not thread safe chipmunks..
This commit is contained in:
parent
7b8be20373
commit
490be4431c
1 changed files with 2 additions and 2 deletions
|
|
@ -1,10 +1,10 @@
|
|||
package land.chipmunk.chipmunkmod.listeners;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
public class ListenerManager {
|
||||
public static List<Listener> listeners = new ArrayList<>();
|
||||
public static List<Listener> listeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
public static void addListener (final Listener listener) {
|
||||
listeners.add(listener);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue