Skip to content

Commit

Permalink
fix(PacketLogger): missing state check (#5062)
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 authored Dec 27, 2024
1 parent 5bf0e5b commit 849659c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ object ModulePacketLogger : ClientModule("PacketLogger", Category.MISC) {
}

fun onPacket(origin: TransferOrigin, packet: Packet<*>, canceled: Boolean = false) {
if (!running) {
return
}

if (origin == TransferOrigin.RECEIVE && !clientbound || origin == TransferOrigin.SEND && !serverbound) {
return
}
Expand Down

0 comments on commit 849659c

Please sign in to comment.