AsyncPlayerPreLoginEvent
, BlockEvent
, EntityEvent
, HangingEvent
, InventoryEvent
, InventoryMoveItemEvent
, InventoryPickupItemEvent
, PlayerEvent
, PlayerLeashEntityEvent
, PlayerPreLoginEvent
, ServerEvent
, TabCompleteEvent
, VehicleEvent
, WeatherEvent
, WorldEvent
public abstract class Event extends Object
HandlerList
as getHandlers()
.Modifier and Type | Class | Description |
---|---|---|
static class |
Event.Result |
Constructor | 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 | Description |
---|---|---|
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 constructor@NotNull public String getEventName()
@NotNull public abstract HandlerList getHandlers()
public final boolean isAsynchronous()
IllegalStateException
.
Copyright © 2019. All rights reserved.