PacketHandler

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class PacketHandler(val priority: EventPriority = EventPriority.NORMAL, val ignoreIfCancelled: Boolean = false)

Annotate a function with a single parameter of type PacketEvent with this function to create an event handler for a packet. Requires implementing PacketListener and registration via registerPacketListener.

Properties

Link copied to clipboard

Whether this handler should be skipped if a previous handler already canceled the event.

Link copied to clipboard
val priority: EventPriority

The priority of this event handler. Handles with higher priority will be called last, and thus be able to override the results of handlers with lower priority.