Class DefinedPacket

java.lang.Object
net.md_5.bungee.protocol.DefinedPacket
Direct Known Subclasses:
BossBar, Chat, ChatChain, ClearTitles, ClientChat, ClientCommand, ClientSettings, ClientStatus, Commands, CookieRequest, CookieResponse, 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, SetCompression, StartConfiguration, StatusRequest, StatusResponse, StoreCookie, Subtitle, SystemChat, TabCompleteRequest, TabCompleteResponse, Team, Title, TitleTimes, Transfer, UnsignedClientCommand, ViewDistance

public abstract class DefinedPacket extends Object
  • Constructor Details

    • DefinedPacket

      public DefinedPacket()
  • Method Details

    • readNullable

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

      public <T> void writeNullable(T t0, BiConsumer<T,io.netty.buffer.ByteBuf> writer, io.netty.buffer.ByteBuf buf)
    • 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)
    • 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,BaseComponent> readEitherBaseComponent(io.netty.buffer.ByteBuf buf, int protocolVersion, boolean string)
    • readBaseComponent

      public static BaseComponent readBaseComponent(io.netty.buffer.ByteBuf buf, int protocolVersion)
    • readBaseComponent

      public static BaseComponent readBaseComponent(io.netty.buffer.ByteBuf buf, int maxStringLength, int protocolVersion)
    • readComponentStyle

      public static ComponentStyle readComponentStyle(io.netty.buffer.ByteBuf buf, int protocolVersion)
    • writeEitherBaseComponent

      public static void writeEitherBaseComponent(Either<String,BaseComponent> message, io.netty.buffer.ByteBuf buf, int protocolVersion)
    • writeBaseComponent

      public static void writeBaseComponent(BaseComponent message, io.netty.buffer.ByteBuf buf, int protocolVersion)
    • writeComponentStyle

      public static void writeComponentStyle(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)
    • 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 se.llbit.nbt.Tag readTag(io.netty.buffer.ByteBuf input, int protocolVersion)
    • writeTag

      public static void writeTag(se.llbit.nbt.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