Class ScriptLoader

java.lang.Object
io.github.syst3ms.skriptparser.parsing.ScriptLoader

public class ScriptLoader extends Object
Contains the logic for loading, parsing, and interpreting entire script files
  • Constructor Details

    • ScriptLoader

      public ScriptLoader()
  • Method Details

    • loadScript

      public static List<LogEntry> loadScript(Path scriptPath, boolean debug)
      Parses and loads the provided script in memory.
      Parameters:
      scriptPath - the script file to load.
      debug - whether debug is enabled.
    • loadScript

      public static List<LogEntry> loadScript(Path scriptPath, SkriptLogger logger, boolean debug)
      Parses and loads the provided script in memory. The provided SkriptLogger can be used within syntaxes to input erroring into the logs during parse time.
      Parameters:
      scriptPath - the script file to load.
      logger - The SkriptLogger to use for the logged entries. Useful for custom logging.
      debug - whether debug is enabled.
    • loadItems

      public static List<Statement> loadItems(FileSection section, ParserState parserState, SkriptLogger logger)
      Parses all items inside of a given section.
      Parameters:
      section - the section
      logger - the logger
      Returns:
      a list of effects inside of the section
    • getTriggerMap

      public static MultiMap<String,Trigger> getTriggerMap()