Class MinecraftMethods

java.lang.Object
com.comphenix.protocol.utility.MinecraftMethods

public final class MinecraftMethods extends Object
Static methods for accessing Minecraft methods.
  • Method Details

    • getFriendlyBufBufConstructor

      public static Function<io.netty.buffer.ByteBuf,Object> getFriendlyBufBufConstructor()
    • getPlayerConnectionSendMethod

      public static MethodAccessor getPlayerConnectionSendMethod()
      Retrieve the send packet method in PlayerConnection/NetServerHandler.
      Returns:
      The send packet method.
    • getPlayerConnectionDisconnectMethod

      public static MethodAccessor getPlayerConnectionDisconnectMethod()
      Retrieve the disconnect method for a given player connection.
      Returns:
      The
    • getNetworkManagerSendMethod

      public static MethodAccessor getNetworkManagerSendMethod()
      Retrieve the handle/send packet method of network manager.
      Returns:
      The handle method.
    • getNetworkManagerReadPacketMethod

      public static MethodAccessor getNetworkManagerReadPacketMethod()
      Retrieve the packetRead(ChannelHandlerContext, Packet) method of NetworkManager.
      Returns:
      The packetRead method.
    • getNetworkManagerDisconnectMethod

      public static MethodAccessor getNetworkManagerDisconnectMethod()
      Retrieve the handle/send packet method of network manager.
      Returns:
      The handle method.
    • getPacketReadByteBufMethod

      public static MethodAccessor getPacketReadByteBufMethod()
      Deprecated.
      no longer works since 1.20.5
      Retrieve the Packet.read(PacketDataSerializer) method.
      Returns:
      The packet read method.
    • getPacketWriteByteBufMethod

      public static MethodAccessor getPacketWriteByteBufMethod()
      Deprecated.
      no longer works since 1.20.5
      Retrieve the Packet.write(PacketDataSerializer) method.

      This only exists in version 1.7.2 and above.

      Returns:
      The packet write method.