Class SkriptEventInfo<E extends SkriptEvent>


public final class SkriptEventInfo<E extends SkriptEvent> extends StructureInfo<E>
  • Field Details

    • events

      public Class<? extends org.bukkit.event.Event>[] events
    • name

      public final String name
    • NO_DOC

      public static final String[] NO_DOC
      Use this as description(String...) to prevent warnings about missing documentation.
  • Constructor Details

    • SkriptEventInfo

      public SkriptEventInfo(String name, String[] patterns, Class<E> eventClass, String originClassPath, Class<? extends org.bukkit.event.Event>[] events)
      Parameters:
      name - Capitalised name of the event without leading "On" which is added automatically (Start the name with an asterisk to prevent this).
      patterns - The Skript patterns to use for this event
      eventClass - The SkriptEvent's class
      originClassPath - The class path for the origin of this event.
      events - The Bukkit-Events this SkriptEvent listens to
  • Method Details

    • listeningBehavior

      public SkriptEventInfo<E> listeningBehavior(SkriptEvent.ListeningBehavior listeningBehavior)
      Sets the default listening behavior for this SkriptEvent. If omitted, the default behavior is to listen to uncancelled events.
      Parameters:
      listeningBehavior - The listening behavior of this SkriptEvent.
      Returns:
      This SkriptEventInfo object
    • description

      public SkriptEventInfo<E> description(String... description)
      Only used for Skript's documentation.
      Parameters:
      description - The description of this event
      Returns:
      This SkriptEventInfo object
    • examples

      public SkriptEventInfo<E> examples(String... examples)
      Only used for Skript's documentation.
      Parameters:
      examples - The examples for this event
      Returns:
      This SkriptEventInfo object
    • keywords

      public SkriptEventInfo<E> keywords(String... keywords)
      Only used for Skript's documentation.
      Parameters:
      keywords - The keywords relating to this event
      Returns:
      This SkriptEventInfo object
    • since

      public SkriptEventInfo<E> since(String since)
      Only used for Skript's documentation.
      Parameters:
      since - The version this event was added in
      Returns:
      This SkriptEventInfo object
    • documentationID

      public SkriptEventInfo<E> documentationID(String id)
      A non-critical ID remapping for syntax elements register using the same class multiple times.
      Only used for Skript's documentation.
      Parameters:
      id - The ID to use for this syntax element
      Returns:
      This SkriptEventInfo object
    • requiredPlugins

      public SkriptEventInfo<E> requiredPlugins(String... pluginNames)
      Other plugin dependencies for this SkriptEvent.
      Only used for Skript's documentation.
      Parameters:
      pluginNames - The names of the plugins this event depends on
      Returns:
      This SkriptEventInfo object
    • getId

      public String getId()
    • getName

      public String getName()
    • getListeningBehavior

      public SkriptEvent.ListeningBehavior getListeningBehavior()
    • getDescription

      public @Nullable String[] getDescription()
    • getExamples

      public @Nullable String[] getExamples()
    • getKeywords

      public @Nullable String[] getKeywords()
    • getSince

      public @Nullable String getSince()
    • getRequiredPlugins

      public @Nullable String[] getRequiredPlugins()
    • getDocumentationID

      public @Nullable String getDocumentationID()