mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-04 09:30:00 +01:00
checkOutgoingPacket
This commit is contained in:
parent
2565ff5f74
commit
2eb2871eb2
@ -184,7 +184,7 @@ class CloudViaCodec(val info: UserConnection) : MessageToMessageCodec<ByteBuf, B
|
||||
}
|
||||
|
||||
override fun encode(ctx: ChannelHandlerContext, bytebuf: ByteBuf, out: MutableList<Any>) {
|
||||
info.checkOutgoingPacket()
|
||||
if (!info.checkOutgoingPacket()) throw CancelEncoderException.generate(null)
|
||||
if (!info.shouldTransformPacket()) {
|
||||
out.add(bytebuf.retain())
|
||||
return
|
||||
@ -197,4 +197,4 @@ class CloudViaCodec(val info: UserConnection) : MessageToMessageCodec<ByteBuf, B
|
||||
transformedBuf.release()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user