Interface AddonModule

All Known Implementing Classes:
BrewingModule, CommonModule, DamageSourceModule, EntityModule, EquippableModule, InteractionModule, ItemComponentModule, ParticleModule, PotionModule, PropertiesModule

public interface AddonModule
A module is a component of a SkriptAddon used for registering syntax and other Skript components.
Modules have two loading phases: init(SkriptAddon) followed by load(SkriptAddon).
The init phase should be used for loading components that are needed first or that may be used by other modules, such as class infos (think numeric types that are used everywhere).
The load phase should be used for loading components more specific to the module, such as syntax.
See Also:
  • Nested Class Summary

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

    Modifier and Type
    Method
    Description
    default boolean
    Allow addons to specify whether they can load or not.
    default void
    Used for loading the components of this module that are needed first or by other modules (e.g.
    void
    Used for loading the components (e.g.
     
    origin(SkriptAddon addon, AddonModule module)
    Constructs an origin from an addon and module name.
  • Method Details

    • origin

      static AddonModule.ModuleOrigin origin(SkriptAddon addon, AddonModule module)
      Constructs an origin from an addon and module name.
      Parameters:
      addon - The addon providing the module.
      module - The module to construct this origin from.
      Returns:
      An origin from the provided information.
    • canLoad

      default boolean canLoad(SkriptAddon addon)
      Allow addons to specify whether they can load or not. Called prior to init(SkriptAddon)
      Parameters:
      addon - The addon this module belongs to.
      Returns:
      Whether this module can load.
    • init

      default void init(SkriptAddon addon)
      Used for loading the components of this module that are needed first or by other modules (e.g. class infos). This method will always be called before load(SkriptAddon).
      Parameters:
      addon - The addon this module belongs to.
      See Also:
    • load

      void load(SkriptAddon addon)
      Used for loading the components (e.g. syntax) of this module.
      Parameters:
      addon - The addon this module belongs to.
      See Also:
    • name

      String name()
      Returns:
      The name of this module.