Class PacketEventsEncoder
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelOutboundHandlerAdapter
io.netty.handler.codec.MessageToMessageEncoder<io.netty.buffer.ByteBuf>
io.github.retrooper.packetevents.injector.handlers.PacketEventsEncoder
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelOutboundHandler
public class PacketEventsEncoder
extends io.netty.handler.codec.MessageToMessageEncoder<io.netty.buffer.ByteBuf>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Object
org.bukkit.entity.Player
com.github.retrooper.packetevents.protocol.player.User
-
Constructor Summary
ConstructorDescriptionPacketEventsEncoder
(com.github.retrooper.packetevents.protocol.player.User user) PacketEventsEncoder
(io.netty.channel.ChannelHandler encoder) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
encode
(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf byteBuf, List<Object> list) void
exceptionCaught
(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) void
write
(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Methods inherited from class io.netty.handler.codec.MessageToMessageEncoder
acceptOutboundMessage
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
user
public com.github.retrooper.packetevents.protocol.player.User user -
player
public org.bukkit.entity.Player player -
COMPRESSION_ENABLED_EVENT
-
-
Constructor Details
-
PacketEventsEncoder
public PacketEventsEncoder(com.github.retrooper.packetevents.protocol.player.User user) -
PacketEventsEncoder
public PacketEventsEncoder(io.netty.channel.ChannelHandler encoder)
-
-
Method Details
-
encode
protected void encode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf byteBuf, List<Object> list) throws Exception - Specified by:
encode
in classio.netty.handler.codec.MessageToMessageEncoder<io.netty.buffer.ByteBuf>
- Throws:
Exception
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception - Specified by:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classio.netty.handler.codec.MessageToMessageEncoder<io.netty.buffer.ByteBuf>
- Throws:
Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception - Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelHandlerAdapter
- Throws:
Exception
-