Class PacketEventsEncoder

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelOutboundHandlerAdapter
io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
io.github.retrooper.packetevents.handlers.PacketEventsEncoder
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler

@Sharable public class PacketEventsEncoder extends io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    com.velocitypowered.api.proxy.Player
     
    com.github.retrooper.packetevents.protocol.player.User
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PacketEventsEncoder(com.github.retrooper.packetevents.protocol.player.User user)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    encode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf msg, io.netty.buffer.ByteBuf out)
     
    void
    exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     
    void
    read(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buffer)
     

    Methods inherited from class io.netty.handler.codec.MessageToByteEncoder

    acceptOutboundMessage, allocateBuffer, isPreferDirect, write

    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

    • player

      public com.velocitypowered.api.proxy.Player player
    • user

      public com.github.retrooper.packetevents.protocol.player.User user
  • Constructor Details

    • PacketEventsEncoder

      public PacketEventsEncoder(com.github.retrooper.packetevents.protocol.player.User user)
  • Method Details

    • read

      public void read(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buffer) throws Exception
      Throws:
      Exception
    • encode

      protected void encode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf msg, io.netty.buffer.ByteBuf out) throws Exception
      Specified by:
      encode in class io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
      Throws:
      Exception
    • exceptionCaught

      public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelHandler
      Overrides:
      exceptionCaught in class io.netty.channel.ChannelHandlerAdapter
      Throws:
      Exception