PacketEvent

class PacketEvent(val player: Player, val packet: Any, var isCancelled: Boolean = false)

Represents a packet event that can be inspected or cancelled during interception.

Constructors

Link copied to clipboard
constructor(player: Player, packet: Any, isCancelled: Boolean = false)

Properties

Link copied to clipboard

Whether the packet has been cancelled and should not be forwarded.

Link copied to clipboard
val packet: Any

The intercepted packet object.

Link copied to clipboard
val player: Player

The player associated with this packet.

Functions

Link copied to clipboard
fun cancel()

Cancels this packet, preventing it from being forwarded through the pipeline.