Class AbstractPacket

java.lang.Object
com.comphenix.packetwrapper.AbstractPacket
Direct Known Subclasses:
WrapperPlayServerEntityDestroy, WrapperPlayServerEntityMetadata, WrapperPlayServerEntityTeleport, WrapperPlayServerSpawnEntity

public abstract class AbstractPacket extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Send the current packet to all online players.
    com.comphenix.protocol.events.PacketContainer
    Retrieve a handle to the raw packet data.
    void
    receivePacket​(org.bukkit.entity.Player sender)
    Simulate receiving the current packet from the given sender.
    void
    recievePacket​(org.bukkit.entity.Player sender)
    Deprecated.
    Misspelled.
    void
    sendPacket​(org.bukkit.entity.Player receiver)
    Send the current packet to the given receiver.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getHandle

      public com.comphenix.protocol.events.PacketContainer getHandle()
      Retrieve a handle to the raw packet data.
      Returns:
      Raw packet data.
    • sendPacket

      public void sendPacket(org.bukkit.entity.Player receiver)
      Send the current packet to the given receiver.
      Parameters:
      receiver - - the receiver.
      Throws:
      RuntimeException - If the packet cannot be sent.
    • broadcastPacket

      public void broadcastPacket()
      Send the current packet to all online players.
    • recievePacket

      @Deprecated public void recievePacket(org.bukkit.entity.Player sender)
      Deprecated.
      Misspelled. recieve to receive
      Simulate receiving the current packet from the given sender.
      Parameters:
      sender - - the sender.
      Throws:
      RuntimeException - If the packet cannot be received.
      See Also:
      receivePacket(Player)
    • receivePacket

      public void receivePacket(org.bukkit.entity.Player sender)
      Simulate receiving the current packet from the given sender.
      Parameters:
      sender - - the sender.
      Throws:
      RuntimeException - if the packet cannot be received.