Package ch.njol.skript.lang.util
Class ContextlessEvent
java.lang.Object
org.bukkit.event.Event
ch.njol.skript.lang.util.ContextlessEvent
This class is intended for usage in places of Skript that require an Event.
Of course, not everything is always context/event dependent.
For example, if one were to load a SectionNode or parse something into a
SyntaxElement
,
and ParserInstance.getCurrentEvents()
was null or empty, the resulting elements
would not be dependent upon a specific Event. Thus, there would be no reason for an Event to be required.
So, this classes exists to avoid dangerously passing null in these places.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Method Summary
Modifier and TypeMethodDescriptionstatic ContextlessEvent
get()
@NotNull HandlerList
This method should never be called.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Method Details
-
get
- Returns:
- A new ContextlessEvent instance to be used for context-less
SyntaxElement
s.
-
getHandlers
This method should never be called.- Specified by:
getHandlers
in classEvent
-