CancelEncoderException, not decoder

This commit is contained in:
creeper123123321 2020-11-14 18:19:56 -03:00
parent 18bd30cdbc
commit 00aed06518

View File

@ -30,7 +30,6 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageEncoder;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.exception.CancelCodecException;
import us.myles.ViaVersion.exception.CancelDecoderException;
import us.myles.ViaVersion.exception.CancelEncoderException;
import us.myles.ViaVersion.util.PipelineUtil;
@ -45,7 +44,7 @@ public class FabricEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
@Override
protected void encode(final ChannelHandlerContext ctx, ByteBuf bytebuf, final List<Object> out) throws Exception {
if (!info.checkOutgoingPacket()) throw CancelDecoderException.generate(null);
if (!info.checkOutgoingPacket()) throw CancelEncoderException.generate(null);
if (!info.shouldTransformPacket()) {
out.add(bytebuf.retain());
return;