Package com.comphenix.protocol
Interface PacketStream
- All Known Subinterfaces:
InternalManager,ProtocolManager
- All Known Implementing Classes:
PacketFilterManager
public interface PacketStream
Represents a object capable of sending or receiving packets.
- Author:
- Kristian
-
Method Summary
Modifier and TypeMethodDescriptionvoidrecieveClientPacket(org.bukkit.entity.Player sender, PacketContainer packet)Simulate recieving a certain packet from a given player.voidrecieveClientPacket(org.bukkit.entity.Player sender, PacketContainer packet, boolean filters)Simulate recieving a certain packet from a given player.voidrecieveClientPacket(org.bukkit.entity.Player sender, PacketContainer packet, NetworkMarker marker, boolean filters)Simulate recieving a certain packet from a given player.voidsendServerPacket(org.bukkit.entity.Player receiver, PacketContainer packet)Send a packet to the given player.voidsendServerPacket(org.bukkit.entity.Player receiver, PacketContainer packet, boolean filters)Send a packet to the given player.voidsendServerPacket(org.bukkit.entity.Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters)Send a packet to the given player.voidsendWirePacket(org.bukkit.entity.Player receiver, int id, byte[] bytes)Send a wire packet to the given player.voidsendWirePacket(org.bukkit.entity.Player receiver, WirePacket packet)Send a wire packet to the given player.
-
Method Details
-
sendServerPacket
void sendServerPacket(org.bukkit.entity.Player receiver, PacketContainer packet) throws InvocationTargetExceptionSend a packet to the given player.- Parameters:
receiver- - the reciever.packet- - packet to send.- Throws:
InvocationTargetException- - if an error occured when sending the packet.
-
sendServerPacket
void sendServerPacket(org.bukkit.entity.Player receiver, PacketContainer packet, boolean filters) throws InvocationTargetExceptionSend a packet to the given player.- Parameters:
receiver- - the reciever.packet- - packet to send.filters- - whether or not to invoke any packet filters belowListenerPriority.MONITOR.- Throws:
InvocationTargetException- - if an error occured when sending the packet.
-
sendServerPacket
void sendServerPacket(org.bukkit.entity.Player receiver, PacketContainer packet, NetworkMarker marker, boolean filters) throws InvocationTargetExceptionSend a packet to the given player.- Parameters:
receiver- - the receiver.packet- - packet to send.marker- - the network marker to use.filters- - whether or not to invoke any packet filters belowListenerPriority.MONITOR.- Throws:
InvocationTargetException- - if an error occured when sending the packet.
-
sendWirePacket
void sendWirePacket(org.bukkit.entity.Player receiver, int id, byte[] bytes) throws InvocationTargetExceptionSend a wire packet to the given player.- Parameters:
receiver- - the receiver.id- - packet id.bytes- - packet bytes.- Throws:
InvocationTargetException- if an error occured when sending the packet.
-
sendWirePacket
void sendWirePacket(org.bukkit.entity.Player receiver, WirePacket packet) throws InvocationTargetExceptionSend a wire packet to the given player.- Parameters:
receiver- - the receiver.packet- - packet to send.- Throws:
InvocationTargetException- if an error occured when sending the packet.
-
recieveClientPacket
void recieveClientPacket(org.bukkit.entity.Player sender, PacketContainer packet) throws IllegalAccessException, InvocationTargetExceptionSimulate recieving a certain packet from a given player.- Parameters:
sender- - the sender.packet- - the packet that was sent.- Throws:
InvocationTargetException- If the reflection machinery failed.IllegalAccessException- If the underlying method caused an error.
-
recieveClientPacket
void recieveClientPacket(org.bukkit.entity.Player sender, PacketContainer packet, boolean filters) throws IllegalAccessException, InvocationTargetExceptionSimulate recieving a certain packet from a given player.- Parameters:
sender- - the sender.packet- - the packet that was sent.filters- - whether or not to invoke any packet filters belowListenerPriority.MONITOR.- Throws:
InvocationTargetException- If the reflection machinery failed.IllegalAccessException- If the underlying method caused an error.
-
recieveClientPacket
void recieveClientPacket(org.bukkit.entity.Player sender, PacketContainer packet, NetworkMarker marker, boolean filters) throws IllegalAccessException, InvocationTargetExceptionSimulate recieving a certain packet from a given player.- Parameters:
sender- - the sender.packet- - the packet that was sent.marker- - the network marker to use.filters- - whether or not to invoke any packet filters belowListenerPriority.MONITOR.- Throws:
InvocationTargetException- If the reflection machinery failed.IllegalAccessException- If the underlying method caused an error.
-