Package net.md_5.bungee.protocol.packet
Class PluginMessage
- java.lang.Object
-
- net.md_5.bungee.protocol.DefinedPacket
-
- net.md_5.bungee.protocol.packet.PluginMessage
-
public class PluginMessage extends DefinedPacket
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.base.Function<String,String>MODERNISEstatic com.google.common.base.Predicate<PluginMessage>SHOULD_RELAY
-
Constructor Summary
Constructors Constructor Description PluginMessage()PluginMessage(String tag, byte[] data, boolean allowExtendedPacket)PluginMessage(String tag, io.netty.buffer.ByteBuf data, boolean allowExtendedPacket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)byte[]getData()DataInputgetStream()StringgetTag()voidhandle(AbstractPacketHandler handler)inthashCode()booleanisAllowExtendedPacket()Allow this packet to be sent as an "extended" packet.voidread(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)voidsetAllowExtendedPacket(boolean allowExtendedPacket)Allow this packet to be sent as an "extended" packet.voidsetData(byte[] data)voidsetData(io.netty.buffer.ByteBuf buf)voidsetTag(String tag)StringtoString()voidwrite(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)-
Methods inherited from class net.md_5.bungee.protocol.DefinedPacket
expectedMaxLength, expectedMinLength, read, readArray, readArray, readString, readString, readStringArray, readTag, readUUID, readVarInt, readVarInt, readVarIntArray, readVarShort, toArray, write, writeArray, writeString, writeString, writeStringArray, writeTag, writeUUID, writeVarInt, writeVarShort
-
-
-
-
Field Detail
-
SHOULD_RELAY
public static final com.google.common.base.Predicate<PluginMessage> SHOULD_RELAY
-
-
Method Detail
-
setData
public void setData(byte[] data)
-
setData
public void setData(io.netty.buffer.ByteBuf buf)
-
read
public void read(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)- Overrides:
readin classDefinedPacket
-
write
public void write(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)- Overrides:
writein classDefinedPacket
-
handle
public void handle(AbstractPacketHandler handler) throws Exception
- Specified by:
handlein classDefinedPacket- Throws:
Exception
-
getStream
public DataInput getStream()
-
getTag
public String getTag()
-
getData
public byte[] getData()
-
isAllowExtendedPacket
public boolean isAllowExtendedPacket()
Allow this packet to be sent as an "extended" packet.
-
setTag
public void setTag(String tag)
-
setAllowExtendedPacket
public void setAllowExtendedPacket(boolean allowExtendedPacket)
Allow this packet to be sent as an "extended" packet.
-
toString
public String toString()
- Specified by:
toStringin classDefinedPacket
-
equals
public boolean equals(Object o)
- Specified by:
equalsin classDefinedPacket
-
canEqual
protected boolean canEqual(Object other)
-
hashCode
public int hashCode()
- Specified by:
hashCodein classDefinedPacket
-
-