Package net.md_5.bungee.protocol
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
abstract void
handle
(AbstractPacketHandler handler) abstract int
hashCode()
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 BaseComponent
readBaseComponent
(io.netty.buffer.ByteBuf buf, int protocolVersion) static BaseComponent
readBaseComponent
(io.netty.buffer.ByteBuf buf, int maxStringLength, int protocolVersion) static ComponentStyle
readComponentStyle
(io.netty.buffer.ByteBuf buf, int protocolVersion) static Either<String,
BaseComponent> readEitherBaseComponent
(io.netty.buffer.ByteBuf buf, int protocolVersion, boolean string) readEnumSet
(Class<E> oclass, io.netty.buffer.ByteBuf buf) static BitSet
readFixedBitSet
(int i, io.netty.buffer.ByteBuf buf) <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) readStringArray
(io.netty.buffer.ByteBuf buf) static se.llbit.nbt.Tag
readTag
(io.netty.buffer.ByteBuf input, int protocolVersion) 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 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
(BaseComponent message, io.netty.buffer.ByteBuf buf, int protocolVersion) static void
writeComponentStyle
(ComponentStyle style, io.netty.buffer.ByteBuf buf, int protocolVersion) static void
writeEitherBaseComponent
(Either<String, BaseComponent> message, io.netty.buffer.ByteBuf buf, int protocolVersion) static <E extends Enum<E>>
voidwriteEnumSet
(EnumSet<E> enumset, Class<E> oclass, io.netty.buffer.ByteBuf buf) static void
writeFixedBitSet
(BitSet bits, int size, io.netty.buffer.ByteBuf buf) <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
(se.llbit.nbt.Tag tag, io.netty.buffer.ByteBuf output, int protocolVersion) static void
static void
writeVarInt
(int value, io.netty.buffer.ByteBuf output) static void
writeVarShort
(io.netty.buffer.ByteBuf buf, int toWrite)
-
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
-
writeString
-
readString
-
readString
-
readEitherBaseComponent
public static Either<String,BaseComponent> readEitherBaseComponent(io.netty.buffer.ByteBuf buf, int protocolVersion, boolean string) -
readBaseComponent
-
readBaseComponent
public static BaseComponent readBaseComponent(io.netty.buffer.ByteBuf buf, int maxStringLength, int protocolVersion) -
readComponentStyle
-
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
-
readStringArray
-
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
-
readUUID
-
writeProperties
-
readProperties
-
writePublicKey
-
readPublicKey
-
writeNumberFormat
public static void writeNumberFormat(NumberFormat format, io.netty.buffer.ByteBuf buf, int protocolVersion) -
readNumberFormat
-
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
-
readEnumSet
-
readFixedBitSet
-
writeFixedBitSet
-
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
-
handle
- Throws:
Exception
-
equals
-
hashCode
public abstract int hashCode() -
toString
-