retrooper / packetevents

PacketEvents is emerging as a strong contender in the realm of Minecraft packet processing libraries. Designed to simplify packet manipulation while delivering high performance, this powerful tool aims to demystify the complexities of projects utilizing packets.
GNU General Public License v3.0
513 stars 148 forks source link

Event fails to cancel #161

Closed MWHunter closed 3 years ago

MWHunter commented 3 years ago

Describe the bug PacketPlayReceiveEvent.cancelled can desync from NMSPacketEvent.cancelled causing strange behavior in terms of packets not cancelling.

receiveevent

retrooper commented 3 years ago

That is weird, I noticed that the NMSPacketEvent#cancelled variable shouldn’t exist, I have a CancellableNMSPacketEvent which extends NMSPacketEvent and has the cancelled variable.

retrooper commented 3 years ago

I’ll look into this when I’m home.

retrooper commented 3 years ago

Afaik NMSPacketEvent#cancelled isn’t used

MWHunter commented 3 years ago

Oh, I found the bug:

I'm not sure what this code does

MWHunter commented 3 years ago

Also, yes NMSPacketEvent#cancelled isn't used anywhere and could be removed.

retrooper commented 3 years ago

Oh, I found the bug:

I'm not sure what this code does

You're right, I will quickly fix this for 1.8, I wasn't sure what I was thinking when I initially wrote the code. I fixed this long ago in 2.0 already.

retrooper commented 3 years ago

Fixed in 1.8-pre-18