Package com.comphenix.protocol
Class PacketLogging
java.lang.Object
com.comphenix.protocol.PacketLogging
- All Implemented Interfaces:
PacketListener,org.bukkit.command.CommandExecutor
public class PacketLogging
extends Object
implements org.bukkit.command.CommandExecutor, PacketListener
Logs packets to a given stream
- Author:
- dmulloy2
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.plugin.PluginRetrieve the plugin that created list packet listener.Retrieve which packets sent by the client this listener will observe.Retrieve which packets sent by the server this listener will observe.booleanonCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)voidonPacketReceiving(PacketEvent event)Invoked right before a received packet from a client is being processed.voidonPacketSending(PacketEvent event)Invoked right before a packet is transmitted from the server to the client.
-
Field Details
-
NAME
- See Also:
- Constant Field Values
-
-
Method Details
-
onCommand
public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)- Specified by:
onCommandin interfaceorg.bukkit.command.CommandExecutor
-
onPacketSending
Description copied from interface:PacketListenerInvoked right before a packet is transmitted from the server to the client.Note that the packet may be replaced, if needed.
This method is executed on the main thread in 1.6.4 and earlier, and thus the Bukkit API is safe to use.
In Minecraft 1.7.2 and later, this method MAY be executed asynchronously, but only if
ListenerOptions.ASYNChave been specified in the listener. This is off by default.- Specified by:
onPacketSendingin interfacePacketListener- Parameters:
event- - the packet that should be sent.
-
onPacketReceiving
Description copied from interface:PacketListenerInvoked right before a received packet from a client is being processed.WARNING:
This method will be called asynchronously! You should synchronize with the main thread usingscheduleSyncDelayedTaskif you need to call the Bukkit API.- Specified by:
onPacketReceivingin interfacePacketListener- Parameters:
event- - the packet that has been received.
-
getSendingWhitelist
Description copied from interface:PacketListenerRetrieve which packets sent by the server this listener will observe.- Specified by:
getSendingWhitelistin interfacePacketListener- Returns:
- List of server packets to observe, along with the priority.
-
getReceivingWhitelist
Description copied from interface:PacketListenerRetrieve which packets sent by the client this listener will observe.- Specified by:
getReceivingWhitelistin interfacePacketListener- Returns:
- List of server packets to observe, along with the priority.
-
getPlugin
public org.bukkit.plugin.Plugin getPlugin()Description copied from interface:PacketListenerRetrieve the plugin that created list packet listener.- Specified by:
getPluginin interfacePacketListener- Returns:
- The plugin, or NULL if not available.
-