Event

Abstract Class

Custom events must extend this class.

The extending version should add any supported event values, and must be registered with the owning library. New instances of the event are created each time the event needs to be triggered.

Extends

Object

Modifiers

public abstract

public class MyEvent extends Event {

    public MyEvent() {
    }

    @EventValue("blob") // event-blob
    public String getBlob() {
        return "blob";
    }

    @EventValue("lettuce") // event-lettuce
    public Object getLettuce() {
        return null;
    }

final MyEvent event = new MyEvent();
// these two are both valid ways to trigger the event
event.run(skript);
skript.runEvent(event);
// for triggering handlers in only one script
skript.runEvent(event, script);

Constructors


new Event ()

Constructor
No description is available for this element.
Return Type

Event

Modifiers

public


Methods


run (Skript)

Method

This is a simple helper method for triggering an event.

IndexTypeName
1Skriptskript
Return Type

void

Modifiers

public final

isAsync ()

Method

This has no purpose currently - all event-handlers run on separate processes.

In the future, this may be used to determine whether a thread should be reused for multiple handlers of the same event or not.

For now, it can be ignored.

Return Type

boolean

Modifiers

public