- Direct Known Subclasses:
- AsyncPlayerPreLoginEvent, BlockEvent, EntityEvent, HangingEvent, InventoryEvent, InventoryMoveItemEvent, InventoryPickupItemEvent, PaintingEvent, PlayerEvent, PlayerPreLoginEvent, ServerEvent, VehicleEvent, WeatherEvent, WorldEvent
public abstract class Event
- extends Object
Represents an event.
- See Also:
The default constructor is defined for cleaner code.
This constructor is used to explicitly declare an event as synchronous
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- The default constructor is defined for cleaner code. This constructor
assumes the event is synchronous.
public Event(boolean isAsync)
- This constructor is used to explicitly declare an event as synchronous
isAsync - true indicates the event will fire asynchronously, false
by default from default constructor
public String getEventName()
- Convenience method for providing a user-friendly identifier. By
default, it is the event's class's simple name.
- name of this event
public abstract HandlerList getHandlers()
public final boolean isAsynchronous()
- Any custom event that should not by synchronized with other events must
use the specific constructor. These are the caveats of using an
- The event is never fired from inside code triggered by a
synchronous event. Attempting to do so results in an
- However, asynchronous event handlers may fire synchronous or
- The event may be fired multiple times simultaneously and in any
- Any newly registered or unregistered handler is ignored after an
event starts execution.
- The handlers for this event may block for any length of time.
- Some implementations may selectively declare a specific event use
as asynchronous. This behavior should be clearly defined.
- Asynchronous calls are not calculated in the plugin timing system.
- false by default, true if the event fires asynchronously
Copyright © 2013. All Rights Reserved.