Event

public abstract class Event

Represents a generic event.

Inheritors

Constructors

Link copied to clipboard
public Event Event()

Properties

Link copied to clipboard
@Deprecated(message = "I think Event class constructor is more useful than this system.")
private final Map<String, Object> metadata

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

Functions

Link copied to clipboard
public final Object getMeta(String key)

Gets a metadata value by key.

Link copied to clipboard
public final Map<String, Object> getMetadata()

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

Link copied to clipboard
public final T getMetaOrDefault<T extends Any>(String key, T default)

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

Link copied to clipboard
public final Object setMeta(String key, Object value)

Sets a metadata key-value pair.