public class MinecraftEncoder extends io.netty.handler.codec.MessageToByteEncoder<DefinedPacket>
Constructor and Description |
---|
MinecraftEncoder(Protocol protocol,
boolean server,
int protocolVersion) |
Modifier and Type | Method and Description |
---|---|
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
DefinedPacket msg,
io.netty.buffer.ByteBuf out) |
void |
setProtocol(Protocol protocol) |
void |
setProtocolVersion(int protocolVersion) |
acceptOutboundMessage, allocateBuffer, isPreferDirect, write
bind, close, connect, deregister, disconnect, flush, read
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
public MinecraftEncoder(Protocol protocol, boolean server, int protocolVersion)
protected void encode(io.netty.channel.ChannelHandlerContext ctx, DefinedPacket msg, io.netty.buffer.ByteBuf out) throws Exception
encode
in class io.netty.handler.codec.MessageToByteEncoder<DefinedPacket>
Exception
public void setProtocol(Protocol protocol)
public void setProtocolVersion(int protocolVersion)
Copyright © 2012–2020 SpigotMC. All rights reserved.