mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-28 05:35:28 +01:00
Clear state related to a packet when its resent.
This commit is contained in:
parent
d746fcbf6c
commit
8e9c9951a9
@ -434,10 +434,13 @@ class ChannelInjector extends ByteToMessageDecoder {
|
||||
*/
|
||||
public void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered) {
|
||||
saveMarker(packet, marker);
|
||||
processedPackets.remove(packet);
|
||||
|
||||
// Record if this packet should be ignored by most listeners
|
||||
if (!filtered) {
|
||||
ignoredPackets.add(packet);
|
||||
} else {
|
||||
ignoredPackets.remove(packet);
|
||||
}
|
||||
|
||||
// Attempt to send the packet with NetworkMarker.handle(), or the PlayerConnection if its active
|
||||
@ -460,9 +463,12 @@ class ChannelInjector extends ByteToMessageDecoder {
|
||||
*/
|
||||
public void recieveClientPacket(Object packet, NetworkMarker marker, boolean filtered) {
|
||||
saveMarker(packet, marker);
|
||||
processedPackets.remove(packet);
|
||||
|
||||
if (!filtered) {
|
||||
ignoredPackets.add(packet);
|
||||
} else {
|
||||
ignoredPackets.remove(packet);
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user