Package net.md_5.bungee.protocol

# Class DefinedPacket

java.lang.Object
net.md_5.bungee.protocol.DefinedPacket

Direct Known Subclasses:
  `BossBar`, `BundleDelimiter`, `Chat`, `ChatChain`, `ClearDialog`, `ClearTitles`, `ClientChat`, `ClientCommand`, `ClientSettings`, `Commands`, `CookieRequest`, `CookieResponse`, `CustomClickAction`, `DisconnectReportDetails`, `EncryptionRequest`, `EncryptionResponse`, `EntityStatus`, `FinishConfiguration`, `GameState`, `Handshake`, `KeepAlive`, `Kick`, `LegacyHandshake`, `LegacyPing`, `Login`, `LoginAcknowledged`, `LoginPayloadRequest`, `LoginPayloadResponse`, `LoginRequest`, `LoginSuccess`, `PingPacket`, `PlayerListHeaderFooter`, `PlayerListItem`, `PlayerListItemRemove`, `PlayerListItemUpdate`, `PluginMessage`, `Respawn`, `ScoreboardDisplay`, `ScoreboardObjective`, `ScoreboardScore`, `ScoreboardScoreReset`, `SeenMessages`, `ServerData`, `ServerLinks`, `SetCompression`, `ShowDialog`, `StartConfiguration`, `StatusRequest`, `StatusResponse`, `StoreCookie`, `Subtitle`, `SystemChat`, `TabCompleteRequest`, `TabCompleteResponse`, `Team`, `Title`, `TitleTimes`, `Transfer`, `UnsignedClientCommand`, `ViewDistance`

public abstract class DefinedPacket extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefinedPacket()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract boolean`
  `equals(Object obj)`
  `abstract void`
  `handle(AbstractPacketHandler handler)`
  `abstract int`
  `hashCode()`
  `Protocol`
  `nextProtocol()`
  `void`
  `read(io.netty.buffer.ByteBuf buf)`
  `void`
  `read(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)`
  `void`
  `read(io.netty.buffer.ByteBuf buf, Protocol protocol, ProtocolConstants.Direction direction, int protocolVersion)`
  `static byte[]`
  `readArray(io.netty.buffer.ByteBuf buf)`
  `static byte[]`
  `readArray(io.netty.buffer.ByteBuf buf, int limit)`
  `static net.md_5.bungee.api.chat.BaseComponent`
  `readBaseComponent(io.netty.buffer.ByteBuf buf, int protocolVersion)`
  `static net.md_5.bungee.api.chat.BaseComponent`
  `readBaseComponent(io.netty.buffer.ByteBuf buf, int maxStringLength, int protocolVersion)`
  `static net.md_5.bungee.api.chat.ComponentStyle`
  `readComponentStyle(io.netty.buffer.ByteBuf buf, int protocolVersion)`
  `static Either<String,net.md_5.bungee.api.chat.BaseComponent>`
  `readEitherBaseComponent(io.netty.buffer.ByteBuf buf, int protocolVersion, boolean string)`
  `static <E extends Enum<E>>
  EnumSet<E>`
  `readEnumSet(Class<E> oclass, io.netty.buffer.ByteBuf buf)`
  `static BitSet`
  `readFixedBitSet(int i, io.netty.buffer.ByteBuf buf)`
  `static <T> T`
  `readLengthPrefixed(com.google.common.base.Function<io.netty.buffer.ByteBuf,T> reader, io.netty.buffer.ByteBuf buf, int maxSize)`
  `static <T> T`
  `readNullable(com.google.common.base.Function<io.netty.buffer.ByteBuf,T> reader, io.netty.buffer.ByteBuf buf)`
  `static NumberFormat`
  `readNumberFormat(io.netty.buffer.ByteBuf buf, int protocolVersion)`
  `static Property[]`
  `readProperties(io.netty.buffer.ByteBuf buf)`
  `static PlayerPublicKey`
  `readPublicKey(io.netty.buffer.ByteBuf buf)`
  `static String`
  `readString(io.netty.buffer.ByteBuf buf)`
  `static String`
  `readString(io.netty.buffer.ByteBuf buf, int maxLen)`
  `static List<String>`
  `readStringArray(io.netty.buffer.ByteBuf buf)`
  `static <T> T`
  `readStringMapKey(io.netty.buffer.ByteBuf buf, Map<String,T> map)`
  `static Tag`
  `readTag(io.netty.buffer.ByteBuf input, int protocolVersion)`
  `static Tag`
  `readTag(io.netty.buffer.ByteBuf input, int protocolVersion, NBTLimiter limiter)`
  `static UUID`
  `readUUID(io.netty.buffer.ByteBuf input)`
  `static int`
  `readVarInt(io.netty.buffer.ByteBuf input)`
  `static int`
  `readVarInt(io.netty.buffer.ByteBuf input, int maxBytes)`
  `static int[]`
  `readVarIntArray(io.netty.buffer.ByteBuf buf)`
  `static int`
  `readVarShort(io.netty.buffer.ByteBuf buf)`
  `static void`
  `setVarInt(int value, io.netty.buffer.ByteBuf output, int pos, int len)`
  `static byte[]`
  `toArray(io.netty.buffer.ByteBuf buf)`
  `abstract String`
  `toString()`
  `void`
  `write(io.netty.buffer.ByteBuf buf)`
  `void`
  `write(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)`
  `void`
  `write(io.netty.buffer.ByteBuf buf, Protocol protocol, ProtocolConstants.Direction direction, int protocolVersion)`
  `static void`
  `writeArray(byte[] b, io.netty.buffer.ByteBuf buf)`
  `static void`
  `writeBaseComponent(net.md_5.bungee.api.chat.BaseComponent message, io.netty.buffer.ByteBuf buf, int protocolVersion)`
  `static void`
  `writeComponentStyle(net.md_5.bungee.api.chat.ComponentStyle style, io.netty.buffer.ByteBuf buf, int protocolVersion)`
  `static void`
  `writeEitherBaseComponent(Either<String,net.md_5.bungee.api.chat.BaseComponent> message, io.netty.buffer.ByteBuf buf, int protocolVersion)`
  `static <E extends Enum<E>>
  void`
  `writeEnumSet(EnumSet<E> enumset, Class<E> oclass, io.netty.buffer.ByteBuf buf)`
  `static void`
  `writeFixedBitSet(BitSet bits, int size, io.netty.buffer.ByteBuf buf)`
  `static <T> void`
  `writeLengthPrefixed(T value, BiConsumer<T,io.netty.buffer.ByteBuf> writer, io.netty.buffer.ByteBuf buf, int maxSize)`
  `static <T> void`
  `writeNullable(T t0, BiConsumer<T,io.netty.buffer.ByteBuf> writer, io.netty.buffer.ByteBuf buf)`
  `static void`
  `writeNumberFormat(NumberFormat format, io.netty.buffer.ByteBuf buf, int protocolVersion)`
  `static void`
  `writeProperties(Property[] properties, io.netty.buffer.ByteBuf buf)`
  `static void`
  `writePublicKey(PlayerPublicKey publicKey, io.netty.buffer.ByteBuf buf)`
  `static void`
  `writeString(String s, io.netty.buffer.ByteBuf buf)`
  `static void`
  `writeString(String s, io.netty.buffer.ByteBuf buf, int maxLength)`
  `static void`
  `writeStringArray(List<String> s, io.netty.buffer.ByteBuf buf)`
  `static void`
  `writeTag(Tag tag, io.netty.buffer.ByteBuf output, int protocolVersion)`
  `static void`
  `writeUUID(UUID value, io.netty.buffer.ByteBuf output)`
  `static void`
  `writeVarInt(int value, io.netty.buffer.ByteBuf output)`
  `static void`
  `writeVarShort(io.netty.buffer.ByteBuf buf, int toWrite)`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### DefinedPacket

    public DefinedPacket()

- ## Method Details

  - ### readNullable

    public static <T> T readNullable(com.google.common.base.Function<io.netty.buffer.ByteBuf,T> reader, io.netty.buffer.ByteBuf buf)

  - ### writeNullable

    public static <T> void writeNullable(T t0, BiConsumer<T,io.netty.buffer.ByteBuf> writer, io.netty.buffer.ByteBuf buf)

  - ### readLengthPrefixed

    public static <T> T readLengthPrefixed(com.google.common.base.Function<io.netty.buffer.ByteBuf,T> reader, io.netty.buffer.ByteBuf buf, int maxSize)

  - ### writeLengthPrefixed

    public static <T> void writeLengthPrefixed(T value, BiConsumer<T,io.netty.buffer.ByteBuf> writer, io.netty.buffer.ByteBuf buf, int maxSize)

  - ### writeString

    public static void writeString(String s, io.netty.buffer.ByteBuf buf)

  - ### writeString

    public static void writeString(String s, io.netty.buffer.ByteBuf buf, int maxLength)

  - ### readStringMapKey

    public static <T> T readStringMapKey(io.netty.buffer.ByteBuf buf, Map<String,T> map)

  - ### readString

    public static String readString(io.netty.buffer.ByteBuf buf)

  - ### readString

    public static String readString(io.netty.buffer.ByteBuf buf, int maxLen)

  - ### readEitherBaseComponent

    public static Either<String,net.md_5.bungee.api.chat.BaseComponent> readEitherBaseComponent(io.netty.buffer.ByteBuf buf, int protocolVersion, boolean string)

  - ### readBaseComponent

    public static net.md_5.bungee.api.chat.BaseComponent readBaseComponent(io.netty.buffer.ByteBuf buf, int protocolVersion)

  - ### readBaseComponent

    public static net.md_5.bungee.api.chat.BaseComponent readBaseComponent(io.netty.buffer.ByteBuf buf, int maxStringLength, int protocolVersion)

  - ### readComponentStyle

    public static net.md_5.bungee.api.chat.ComponentStyle readComponentStyle(io.netty.buffer.ByteBuf buf, int protocolVersion)

  - ### writeEitherBaseComponent

    public static void writeEitherBaseComponent(Either<String,net.md_5.bungee.api.chat.BaseComponent> message, io.netty.buffer.ByteBuf buf, int protocolVersion)

  - ### writeBaseComponent

    public static void writeBaseComponent(net.md_5.bungee.api.chat.BaseComponent message, io.netty.buffer.ByteBuf buf, int protocolVersion)

  - ### writeComponentStyle

    public static void writeComponentStyle(net.md_5.bungee.api.chat.ComponentStyle style, io.netty.buffer.ByteBuf buf, int protocolVersion)

  - ### writeArray

    public static void writeArray(byte[] b, io.netty.buffer.ByteBuf buf)

  - ### toArray

    public static byte[] toArray(io.netty.buffer.ByteBuf buf)

  - ### readArray

    public static byte[] readArray(io.netty.buffer.ByteBuf buf)

  - ### readArray

    public static byte[] readArray(io.netty.buffer.ByteBuf buf, int limit)

  - ### readVarIntArray

    public static int[] readVarIntArray(io.netty.buffer.ByteBuf buf)

  - ### writeStringArray

    public static void writeStringArray(List<String> s, io.netty.buffer.ByteBuf buf)

  - ### readStringArray

    public static List<String> readStringArray(io.netty.buffer.ByteBuf buf)

  - ### readVarInt

    public static int readVarInt(io.netty.buffer.ByteBuf input)

  - ### readVarInt

    public static int readVarInt(io.netty.buffer.ByteBuf input, int maxBytes)

  - ### writeVarInt

    public static void writeVarInt(int value, io.netty.buffer.ByteBuf output)

  - ### setVarInt

    public static void setVarInt(int value, io.netty.buffer.ByteBuf output, int pos, int len)

  - ### readVarShort

    public static int readVarShort(io.netty.buffer.ByteBuf buf)

  - ### writeVarShort

    public static void writeVarShort(io.netty.buffer.ByteBuf buf, int toWrite)

  - ### writeUUID

    public static void writeUUID(UUID value, io.netty.buffer.ByteBuf output)

  - ### readUUID

    public static UUID readUUID(io.netty.buffer.ByteBuf input)

  - ### writeProperties

    public static void writeProperties(Property[] properties, io.netty.buffer.ByteBuf buf)

  - ### readProperties

    public static Property[] readProperties(io.netty.buffer.ByteBuf buf)

  - ### writePublicKey

    public static void writePublicKey(PlayerPublicKey publicKey, io.netty.buffer.ByteBuf buf)

  - ### readPublicKey

    public static PlayerPublicKey readPublicKey(io.netty.buffer.ByteBuf buf)

  - ### writeNumberFormat

    public static void writeNumberFormat(NumberFormat format, io.netty.buffer.ByteBuf buf, int protocolVersion)

  - ### readNumberFormat

    public static NumberFormat readNumberFormat(io.netty.buffer.ByteBuf buf, int protocolVersion)

  - ### readTag

    public static Tag readTag(io.netty.buffer.ByteBuf input, int protocolVersion)

  - ### readTag

    public static Tag readTag(io.netty.buffer.ByteBuf input, int protocolVersion, NBTLimiter limiter)

  - ### writeTag

    public static void writeTag(Tag tag, io.netty.buffer.ByteBuf output, int protocolVersion)

  - ### writeEnumSet

    public static <E extends Enum<E>> void writeEnumSet(EnumSet<E> enumset, Class<E> oclass, io.netty.buffer.ByteBuf buf)

  - ### readEnumSet

    public static <E extends Enum<E>> EnumSet<E> readEnumSet(Class<E> oclass, io.netty.buffer.ByteBuf buf)

  - ### readFixedBitSet

    public static BitSet readFixedBitSet(int i, io.netty.buffer.ByteBuf buf)

  - ### writeFixedBitSet

    public static void writeFixedBitSet(BitSet bits, int size, io.netty.buffer.ByteBuf buf)

  - ### read

    public void read(io.netty.buffer.ByteBuf buf)

  - ### read

    public void read(io.netty.buffer.ByteBuf buf, Protocol protocol, ProtocolConstants.Direction direction, int protocolVersion)

  - ### read

    public void read(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)

  - ### write

    public void write(io.netty.buffer.ByteBuf buf)

  - ### write

    public void write(io.netty.buffer.ByteBuf buf, Protocol protocol, ProtocolConstants.Direction direction, int protocolVersion)

  - ### write

    public void write(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)

  - ### nextProtocol

    public Protocol nextProtocol()

  - ### handle

    public abstract void handle(AbstractPacketHandler handler) throws Exception
    Throws:
      `Exception`

  - ### equals

    public abstract boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public abstract int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public abstract String toString()
    Overrides:
      `toString` in class `Object`