mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-06 10:27:26 +02:00
Prefer to synchronize adding players.
Does not seem to be strictly necessary, because the data is comparably light-weight and the data loss on some time slices would usually be small. Should be cleaner, as this is a seldom event (login, logout).
This commit is contained in:
parent
7b6305de78
commit
59fca0f43e
@ -37,7 +37,7 @@ public class FlyingFrequency extends PacketAdapter implements Listener, JoinLeav
|
|||||||
super(plugin, PacketType.Play.Client.FLYING); // TODO: How does POS and POS_LOOK relate/translate?
|
super(plugin, PacketType.Play.Client.FLYING); // TODO: How does POS and POS_LOOK relate/translate?
|
||||||
}
|
}
|
||||||
|
|
||||||
private ActionFrequency addName(String name) {
|
private synchronized ActionFrequency addName(String name) {
|
||||||
Map<String, ActionFrequency> freqMap = new HashMap<String, ActionFrequency>(this.freqMap);
|
Map<String, ActionFrequency> freqMap = new HashMap<String, ActionFrequency>(this.freqMap);
|
||||||
ActionFrequency freq = new ActionFrequency(5, 1000);
|
ActionFrequency freq = new ActionFrequency(5, 1000);
|
||||||
freqMap.put(name, freq);
|
freqMap.put(name, freq);
|
||||||
|
Loading…
Reference in New Issue
Block a user