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 Details

  • Method Details

    • onCommand

      public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
    • onPacketSending

      public void onPacketSending(PacketEvent event)
      Description copied from interface: PacketListener
      Invoked 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.ASYNC have been specified in the listener. This is off by default.

      Specified by:
      onPacketSending in interface PacketListener
      Parameters:
      event - - the packet that should be sent.
    • onPacketReceiving

      public void onPacketReceiving(PacketEvent event)
      Description copied from interface: PacketListener
      Invoked 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 using scheduleSyncDelayedTask if you need to call the Bukkit API.

      Specified by:
      onPacketReceiving in interface PacketListener
      Parameters:
      event - - the packet that has been received.
    • getSendingWhitelist

      public ListeningWhitelist getSendingWhitelist()
      Description copied from interface: PacketListener
      Retrieve which packets sent by the server this listener will observe.
      Specified by:
      getSendingWhitelist in interface PacketListener
      Returns:
      List of server packets to observe, along with the priority.
    • getReceivingWhitelist

      public ListeningWhitelist getReceivingWhitelist()
      Description copied from interface: PacketListener
      Retrieve which packets sent by the client this listener will observe.
      Specified by:
      getReceivingWhitelist in interface PacketListener
      Returns:
      List of server packets to observe, along with the priority.
    • getPlugin

      public org.bukkit.plugin.Plugin getPlugin()
      Description copied from interface: PacketListener
      Retrieve the plugin that created list packet listener.
      Specified by:
      getPlugin in interface PacketListener
      Returns:
      The plugin, or NULL if not available.