mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-25 01:21:20 +01:00
Re-fix cached packets
This commit is contained in:
parent
93bd039938
commit
368faa72b9
@ -138,14 +138,10 @@ public class NettyPlayerConnection extends PlayerConnection {
|
|||||||
final boolean shouldUpdate = timedBuffer == null ||
|
final boolean shouldUpdate = timedBuffer == null ||
|
||||||
timestamp > timedBuffer.getTimestamp();
|
timestamp > timedBuffer.getTimestamp();
|
||||||
|
|
||||||
|
if (shouldUpdate) {
|
||||||
if (timedBuffer == null) {
|
|
||||||
// Buffer not found, create it
|
|
||||||
final ByteBuf buffer = PacketUtils.createFramedPacket(serverPacket, false);
|
final ByteBuf buffer = PacketUtils.createFramedPacket(serverPacket, false);
|
||||||
timedBuffer = new TimedBuffer(buffer, timestamp);
|
timedBuffer = new TimedBuffer(buffer, timestamp);
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldUpdate) {
|
|
||||||
temporaryCache.cache(identifier, timedBuffer);
|
temporaryCache.cache(identifier, timedBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user