Class PulseBufferFlushEvent

java.lang.Object
org.bukkit.event.Event
dev.pulsemc.pulse.api.events.network.PulseBufferFlushEvent

public class PulseBufferFlushEvent extends Event
Triggered when the PulseBuffer flushes accumulated packets to the network.

This event is not cancellable as the flush process has already started at the network layer.

  • Constructor Details

    • PulseBufferFlushEvent

      public PulseBufferFlushEvent(Player player, FlushReason reason, int packetCount, long totalBytes)
  • Method Details

    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Gets the player whose buffer was flushed.
      Returns:
      the player
    • getReason

      @NotNull public @NotNull FlushReason getReason()
      Gets the reason for the flush.
      Returns:
      flush reason
    • getPacketCount

      public int getPacketCount()
      Gets the number of packets in this batch.
      Returns:
      packet count
    • getTotalBytes

      public long getTotalBytes()
      Gets the size of the batch in bytes.
      Returns:
      size in bytes
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()