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 Type
    Method
    Description
    get()
     
    @NotNull org.bukkit.event.HandlerList
    This method should never be called.

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public static ContextlessEvent get()
      Returns:
      A new ContextlessEvent instance to be used for context-less SyntaxElements.
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      This method should never be called.
      Specified by:
      getHandlers in class org.bukkit.event.Event