Package com.comphenix.packetwrapper
Class AbstractPacket
java.lang.Object
com.comphenix.packetwrapper.AbstractPacket
- Direct Known Subclasses:
WrapperPlayServerEntityDestroy,WrapperPlayServerEntityMetadata,WrapperPlayServerEntityTeleport,WrapperPlayServerSpawnEntity
-
Method Summary
Modifier and TypeMethodDescriptionvoidSend the current packet to all online players.com.comphenix.protocol.events.PacketContainerRetrieve a handle to the raw packet data.voidreceivePacket(org.bukkit.entity.Player sender)Simulate receiving the current packet from the given sender.voidrecievePacket(org.bukkit.entity.Player sender)Deprecated.Misspelled.voidsendPacket(org.bukkit.entity.Player receiver)Send the current packet to the given receiver.
-
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.Misspelled. recieve to receiveSimulate 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.
-