mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-03 19:00:30 +02:00
Only add TickListener instances once.
This commit is contained in:
parent
de5f152df9
commit
d15a1d1f9e
|
@ -175,7 +175,9 @@ public class TickTask implements Runnable {
|
||||||
public static void addTickListener(TickListener listener){
|
public static void addTickListener(TickListener listener){
|
||||||
synchronized (tickListeners) {
|
synchronized (tickListeners) {
|
||||||
if (locked) return;
|
if (locked) return;
|
||||||
tickListeners.add(listener);
|
if (!tickListeners.contains(listener)){
|
||||||
|
tickListeners.add(listener);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user