Interface Skript

All Superinterfaces:
SkriptAddon, ViewProvider<SkriptAddon>

@Experimental public interface Skript extends SkriptAddon
The main class for everything related to Skript.
  • Method Details

    • of

      @Contract("_, _ -> new") static Skript of(Class<?> source, String name)
      Constructs a default implementation of a Skript. It makes use of the default implementations of required components.
      Parameters:
      source - The main class of the application creating this Skript. Typically, this can be the class invoking this method.
      name - The name for the Skript to use.
      Returns:
      A Skript.
    • registerAddon

      @Contract("_, _ -> new") SkriptAddon registerAddon(Class<?> source, String name)
      Registers the provided addon with this Skript and loads the provided modules.
      Parameters:
      source - The main class of the application registering this addon. Typically, this can be the class invoking this method.
      name - The name of the addon to register.
    • addons

      @Unmodifiable Collection<SkriptAddon> addons()
      Returns:
      An unmodifiable snapshot of addons currently registered with this Skript.
    • unmodifiableView

      @Contract("-> new") default Skript unmodifiableView()
      Constructs an unmodifiable view of this Skript. That is, the returned Skript will be unable to register new addons and the individual addons from addons() will be unmodifiable. Additionally, it will return unmodifiable views of its inherited SkriptAddon components.
      Specified by:
      unmodifiableView in interface SkriptAddon
      Specified by:
      unmodifiableView in interface ViewProvider<SkriptAddon>
      Returns:
      An unmodifiable view of this Skript.
      See Also: