Class PulseChunkOptimizationEvent

java.lang.Object
org.bukkit.event.Event
dev.pulsemc.pulse.api.events.optimization.PulseChunkOptimizationEvent
All Implemented Interfaces:
Cancellable

public class PulseChunkOptimizationEvent extends Event implements Cancellable
Triggered when Pulse detects massive block updates in a single chunk and attempts to replace them with a single ChunkData packet.

If cancelled, the server will send the original individual block update packets.

  • Constructor Details

    • PulseChunkOptimizationEvent

      public PulseChunkOptimizationEvent(Player player, Chunk chunk, int packetCount)
  • Method Details

    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Gets the player receiving the updates.
      Returns:
      the player
    • getChunk

      @NotNull public @NotNull Chunk getChunk()
      Gets the chunk where the updates are happening.
      Returns:
      the chunk
    • getPacketCount

      public int getPacketCount()
      Gets the number of individual block update packets that were queued.
      Returns:
      packet count
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlers

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

      public static HandlerList getHandlerList()