mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-21 07:31:47 +01:00
Ensure thread safety
This commit is contained in:
parent
abbf7f932d
commit
164873c313
@ -118,7 +118,9 @@ public class NettyPlayerConnection extends PlayerConnection {
|
||||
if (getPlayer() != null) {
|
||||
// Flush happen during #update()
|
||||
if (serverPacket instanceof CacheablePacket && MinecraftServer.hasPacketCaching()) {
|
||||
CacheablePacket.writeCache(tickBuffer, serverPacket);
|
||||
synchronized (tickBuffer) {
|
||||
CacheablePacket.writeCache(tickBuffer, serverPacket);
|
||||
}
|
||||
} else {
|
||||
write(serverPacket, skipTranslating);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user