public abstract class Event extends Object
HandlerList
as getHandlers()
.Modifier and Type | Class and Description |
---|---|
static class |
Event.Result |
Constructor and Description |
---|
Event()
The default constructor is defined for cleaner code.
|
Event(boolean isAsync)
This constructor is used to explicitly declare an event as synchronous
or asynchronous.
|
Modifier and Type | Method and Description |
---|---|
boolean |
callEvent()
Calls the event and tests if cancelled.
|
String |
getEventName()
Convenience method for providing a user-friendly identifier.
|
abstract HandlerList |
getHandlers() |
boolean |
isAsynchronous()
Any custom event that should not by synchronized with other events must
use the specific constructor.
|
public Event()
public Event(boolean isAsync)
isAsync
- true indicates the event will fire asynchronously, false
by default from default constructorpublic boolean callEvent()
public String getEventName()
public abstract HandlerList getHandlers()
public final boolean isAsynchronous()
IllegalStateException
.
Copyright © 2021. All rights reserved.