AsyncPlayerPreLoginEvent
, AsyncTabCompleteEvent
, BlockEvent
, EntityEvent
, FillProfileEvent
, GS4QueryEvent
, HangingEvent
, InventoryEvent
, InventoryMoveItemEvent
, InventoryPickupItemEvent
, LookupProfileEvent
, PlayerConnectionCloseEvent
, PlayerEvent
, PlayerHandshakeEvent
, PlayerLeashEntityEvent
, PlayerPreLoginEvent
, PreCreatureSpawnEvent
, PreFillProfileEvent
, PreLookupProfileEvent
, ProfileWhitelistVerifyEvent
, ServerEvent
, ServerExceptionEvent
, ServerTickEndEvent
, ServerTickStartEvent
, TabCompleteEvent
, UnknownCommandEvent
, VehicleEvent
, WeatherEvent
, WhitelistToggleEvent
, 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 |
---|---|---|
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()
@NotNull public String getEventName()
@NotNull public abstract HandlerList getHandlers()
public final boolean isAsynchronous()
IllegalStateException
.
Copyright © 2020. All rights reserved.