Class ScriptManager

java.lang.Object
de.luckymcdev.foundryengine.script.common.ScriptManager

public final class ScriptManager extends Object
MANAGER: creates and owns everything else (definitions, runtimes, editor state, compiler, thread pools).

Compilation is parallel across bundles on a bounded daemon pool. To get that parallelism call prepareAll(Map) once with all bundles before the first load(String, BundleFiles, ScriptEnv); a lone load(String, BundleFiles, ScriptEnv) compiles just its bundle. Entry code (constructors, onLoad, onUnload) runs on the calling thread's behalf under the sandbox timeout, in load order.

  • Constructor Details

    • ScriptManager

      public ScriptManager(Set<ScriptEnv> activeEnvs)
      Parameters:
      activeEnvs - environments this JVM runs: all three on a client, COMMON and SERVER on a dedicated server. Scripts of other environments are never compiled.
  • Method Details