Package ch.njol.skript.lang.util
Class ContextlessEvent
java.lang.Object
org.bukkit.event.Event
ch.njol.skript.lang.util.ContextlessEvent
public final class ContextlessEvent
extends org.bukkit.event.Event
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
org.bukkit.event.Event.Result
-
Method Summary
Modifier and TypeMethodDescriptionstatic ContextlessEvent
get()
@NotNull org.bukkit.event.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
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()This method should never be called.- Specified by:
getHandlers
in classorg.bukkit.event.Event
-