Class PacketEventsDecoder

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<io.netty.buffer.ByteBuf>
io.github.retrooper.packetevents.handlers.PacketEventsDecoder
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

@Sharable public class PacketEventsDecoder extends io.netty.handler.codec.MessageToMessageDecoder<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
    boolean
     
    com.velocitypowered.api.proxy.Player
     
    com.github.retrooper.packetevents.protocol.player.User
     
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    channelInactive(@NotNull io.netty.channel.ChannelHandlerContext ctx)
     
    protected void
    decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf byteBuf, List<Object> out)
     
    void
    read(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf byteBuf, List<Object> output)
     
    void
    userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object event)
     

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

    acceptInboundMessage, channelRead

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught

    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 com.velocitypowered.api.proxy.Player player
    • handledCompression

      public boolean handledCompression
  • Constructor Details

    • PacketEventsDecoder

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

    • read

      public void read(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf byteBuf, List<Object> output) throws Exception
      Throws:
      Exception
    • decode

      protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf byteBuf, List<Object> out) throws Exception
      Specified by:
      decode in class io.netty.handler.codec.MessageToMessageDecoder<io.netty.buffer.ByteBuf>
      Throws:
      Exception
    • userEventTriggered

      public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object event) throws Exception
      Specified by:
      userEventTriggered in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      userEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelInactive

      public void channelInactive(@NotNull @NotNull io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception