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 final String`
  `BUNGEE_CHANNEL_LEGACY`
  `static final String`
  `BUNGEE_CHANNEL_MODERN`
  `static final com.google.common.base.Function<String,String>`
  `MODERNISE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PluginMessage()`
  `PluginMessage(String tag, byte[] data, boolean allowExtendedPacket)`
  Creates a new `PluginMessage` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `byte[]`
  `getData()`
  `DataInput`
  `getStream()`
  `String`
  `getTag()`
  `void`
  `handle(AbstractPacketHandler handler)`
  `int`
  `hashCode()`
  `boolean`
  `isAllowExtendedPacket()`
  Allow this packet to be sent as an "extended" packet.
  `void`
  `read(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)`
  `void`
  `setAllowExtendedPacket(boolean allowExtendedPacket)`
  Allow this packet to be sent as an "extended" packet.
  `void`
  `setData(byte[] data)`
  `void`
  `setTag(String tag)`
  `String`
  `toString()`
  `void`
  `write(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)`

  ### Methods inherited from class net.md_5.bungee.protocol.DefinedPacket

  `nextProtocol, read, read, readArray, readArray, readBaseComponent, readBaseComponent, readComponentStyle, readEitherBaseComponent, readEnumSet, readFixedBitSet, readLengthPrefixed, readNullable, readNumberFormat, readProperties, readPublicKey, readString, readString, readStringArray, readStringMapKey, readTag, readTag, readUUID, readVarInt, readVarInt, readVarIntArray, readVarShort, setVarInt, toArray, write, write, writeArray, writeBaseComponent, writeComponentStyle, writeEitherBaseComponent, writeEnumSet, writeFixedBitSet, writeLengthPrefixed, writeNullable, writeNumberFormat, writeProperties, writePublicKey, writeString, writeString, writeStringArray, writeTag, writeUUID, writeVarInt, writeVarShort`

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

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

- ## Field Details

  - ### BUNGEE_CHANNEL_LEGACY

    public static final String BUNGEE_CHANNEL_LEGACY
    See Also:
      - Constant Field Values

  - ### BUNGEE_CHANNEL_MODERN

    public static final String BUNGEE_CHANNEL_MODERN
    See Also:
      - Constant Field Values

  - ### MODERNISE

    public static final com.google.common.base.Function<String,String> MODERNISE

- ## Constructor Details

  - ### PluginMessage

    public PluginMessage()

  - ### PluginMessage

    public PluginMessage(String tag, byte[] data, boolean allowExtendedPacket)
    Creates a new `PluginMessage` instance.
    Parameters:
      `tag` -
      `data` -
      `allowExtendedPacket` - Allow this packet to be sent as an "extended" packet.

- ## Method Details

  - ### read

    public void read(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
    Overrides:
      `read` in class `DefinedPacket`

  - ### write

    public void write(io.netty.buffer.ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
    Overrides:
      `write` in class `DefinedPacket`

  - ### handle

    public void handle(AbstractPacketHandler handler) throws Exception
    Specified by:
      `handle` in class `DefinedPacket`
    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)

  - ### setData

    public void setData(byte[] data)

  - ### setAllowExtendedPacket

    public void setAllowExtendedPacket(boolean allowExtendedPacket)
    Allow this packet to be sent as an "extended" packet.

  - ### toString

    public String toString()
    Specified by:
      `toString` in class `DefinedPacket`

  - ### equals

    public boolean equals(Object o)
    Specified by:
      `equals` in class `DefinedPacket`

  - ### canEqual

    protected boolean canEqual(Object other)

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in class `DefinedPacket`