public static class ScriptFactory.Companion
@NotNull public GameScript get(@NotNull java.nio.file.Path path, @NotNull ScriptCompiler mode)
Get class GameScript instance by existing file's path.
path - Path to script file.mode - Compiler to interpret the script. (No effect on legacy script engine)IllegalArgumentException - is thrown if file indicated by path doesn't exist.ScriptEngineNotFound - is thrown if either file extension or script engine is not valid.RuntimeException - is thrown if plugin fails to load scriptclass GameScript,
path