Interface Origin

All Known Subinterfaces:
AddonModule.ModuleOrigin, Origin.AddonOrigin

public sealed interface Origin permits Origin.AddonOrigin (not exhaustive)
Provides information about the origin of something (such as syntax).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An origin to be used for something provided by an addon.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Origin
    An origin to be used in cases where no information is known.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static Origin
    of(SkriptAddon addon)
    Constructs an origin from an addon.
  • Field Details

    • UNKNOWN

      static final Origin UNKNOWN
      An origin to be used in cases where no information is known.
  • Method Details

    • of

      @Contract("_ -> new") static Origin of(SkriptAddon addon)
      Constructs an origin from an addon.
      Parameters:
      addon - The addon to construct this origin from.
      Returns:
      An origin pointing to the provided addon.
    • name

      String name()
      Returns:
      A string representing this origin.