A new event API with the goal of being more modular, making it easier to extend the event system, and making plugin code more testable. The old API is still present and working.
The entire event system has almost zero dependence on other parts of the Bukkit API. All Plugin dependence is isolated to a few superfluous subclasses.
A rich set of types for working with event handlers e.g. RegisteredHandler, EventHandlerMeta, etc.
EventRegistry interface for creating and registering event handlers. Each Plugin has its own PluginEventRegistry, but there is also a SimpleEventRegistry that does not depend on Plugin.
EventBus interface for firing events, one instance per Server. Allows fine control of the dispatch process for custom event systems. Implemented by SimpleEventBus.
All reflection stuff can be done on Listener classes, rather than instances, allowing for caching and fast failure, though SB itself doesn't take advantage of this yet.
Exceptions thrown from event handlers no longer prevent other handlers from running.
The "yielding events" patch is merged into this, with a much simpler dispatch algorithm that doesn't create huge stack traces.
A new event API with the goal of being more modular, making it easier to extend the event system, and making plugin code more testable. The old API is still present and working.
Plugin
dependence is isolated to a few superfluous subclasses.RegisteredHandler
,EventHandlerMeta
, etc.EventRegistry
interface for creating and registering event handlers. EachPlugin
has its ownPluginEventRegistry
, but there is also aSimpleEventRegistry
that does not depend onPlugin
.EventBus
interface for firing events, one instance perServer
. Allows fine control of the dispatch process for custom event systems. Implemented bySimpleEventBus
.Listener
classes, rather than instances, allowing for caching and fast failure, though SB itself doesn't take advantage of this yet.