Interface RecievePacketEvent

All Superinterfaces:
Event

public interface RecievePacketEvent extends Event
This event is called when data packets are transmitted from the client to the server.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    RawSettings data.
    Data converted to a string.
    The method should be safe (with standard Minecraft packages it is, WeCui package is also processed normally),
    but it is desirable to test it before full use.
    Be sure to check the package ID before using this method,
    it will save you from working with unnecessary data and reduce the risk of failed decryption to a minimum.
    The player from whom the data packet was received.
    Data packet identifier.
    UUID of the player from whom the data packet was received.
    boolean
    Returns true if and only if (this.writerIndex - this.readerIndex) is greater than 0.
    int
    Returns the number of readable bytes which is equal to (this.writerIndex - this.readerIndex).

    Methods inherited from interface org.spongepowered.api.event.Event

    cause, context, source
  • Method Details

    • getPlayerUniqueId

      UUID getPlayerUniqueId()
      UUID of the player from whom the data packet was received.
    • getMixinPlayer

      MixinServerPlayer getMixinPlayer()
      The player from whom the data packet was received.
      Returns:
      MixinServerPlayer
    • getPacketName

      String getPacketName()
      Data packet identifier.
    • getData

      byte[] getData()
      RawSettings data.
    • readableBytes

      int readableBytes()
      Returns the number of readable bytes which is equal to (this.writerIndex - this.readerIndex).
    • getDataAsString

      String getDataAsString()
      Data converted to a string.
      The method should be safe (with standard Minecraft packages it is, WeCui package is also processed normally),
      but it is desirable to test it before full use.
      Be sure to check the package ID before using this method,
      it will save you from working with unnecessary data and reduce the risk of failed decryption to a minimum.
    • isReadable

      boolean isReadable()
      Returns true if and only if (this.writerIndex - this.readerIndex) is greater than 0.
      Returns: