public class ScheduledPacket extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
filtered |
protected PacketContainer |
packet |
protected org.bukkit.entity.Player |
target |
| Constructor and Description |
|---|
ScheduledPacket(PacketContainer packet,
org.bukkit.entity.Player target,
boolean filtered)
Construct a new scheduled packet.
|
| Modifier and Type | Method and Description |
|---|---|
static ScheduledPacket |
fromFiltered(PacketContainer packet,
org.bukkit.entity.Player target)
Construct a new scheduled packet that will be processed by any packet listeners.
|
static ScheduledPacket |
fromSilent(PacketContainer packet,
org.bukkit.entity.Player target)
Construct a new scheduled packet that will not be processed by any packet listeners (except MONITOR).
|
PacketContainer |
getPacket()
Retrieve the packet that will be sent or transmitted.
|
PacketType.Sender |
getSender()
Retrieve the sender of this packet.
|
org.bukkit.entity.Player |
getTarget()
Retrieve the target player.
|
boolean |
isFiltered()
Determine if this packet will be processed by any of the packet listeners.
|
void |
schedule()
Schedule the packet transmission or reception.
|
void |
schedule(PacketStream stream)
Schedule the packet transmission or reception.
|
void |
setFiltered(boolean filtered)
Set whether or not this packet will be processed by packet listeners (except MONITOR listeners).
|
void |
setPacket(PacketContainer packet)
Set the packet that will be sent or transmitted.
|
void |
setTarget(org.bukkit.entity.Player target)
Set the target player.
|
String |
toString() |
protected PacketContainer packet
protected org.bukkit.entity.Player target
protected boolean filtered
public ScheduledPacket(PacketContainer packet, org.bukkit.entity.Player target, boolean filtered)
Note that the sender is infered from the packet type.
packet - - the packet.target - - the target player.filtered - - whether or not topublic static ScheduledPacket fromSilent(PacketContainer packet, org.bukkit.entity.Player target)
packet - - the packet.target - - the target player.public static ScheduledPacket fromFiltered(PacketContainer packet, org.bukkit.entity.Player target)
packet - - the packet.target - - the target player.public PacketContainer getPacket()
public void setPacket(PacketContainer packet)
packet - - the new packet, cannot be NULL.public org.bukkit.entity.Player getTarget()
public void setTarget(org.bukkit.entity.Player target)
target - - the new target, cannot be NULL.public boolean isFiltered()
public void setFiltered(boolean filtered)
filtered - - TRUE if it should be processed by listeners, FALSE otherwise.public PacketType.Sender getSender()
public void schedule()
public void schedule(PacketStream stream)
stream - - the packet stream.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.