CancelableEvent

abstract class CancelableEvent : Event

Represents an event that can be canceled.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Indicates whether the event is canceled.

Link copied to clipboard

The metadata of the event. This can be used to store additional information about the event.

Functions

Link copied to clipboard
fun cancel()

Cancels the event.

Link copied to clipboard
fun getMeta(key: String): Any?

Gets a metadata value by key.

Link copied to clipboard
fun <T> getMetaOrDefault(key: String, default: T): T

Gets a metadata value by key or a default value if the value is null.

Link copied to clipboard
fun reset()

Uncancels the event.

Link copied to clipboard
fun setMeta(key: String, value: Any): Any?

Sets a metadata key-value pair.