Compilation and cache

Worker pool, SHA-256, reload and block readiness.

Background work

Java compilation and Maven artifact downloads use a bounded worker pool. compiler.threads selects 1-4 threads. Identical concurrent requests share one compilation task.

Code execution does not move into this pool: the block runs on its event thread. This does not make Bukkit calls safe from arbitrary threads.

Cache keys

The full SHA-256 covers expanded source, including included content. Identical code may share a class between scripts while each call site retains its own error mapping.

compiler.cache-size bounds entries: default 256, minimum 16. A completed least-recently-used entry is evicted when needed. If all entries are pending, a new request may fail with a full cache/queue error.

Reload behavior

  • /sk reload keeps successful classes and allows failed compilation/download requests to retry.
  • Changed source produces a different key.
  • Restarting the server clears compiled classes; there is no on-disk bytecode cache.
  • Dependency JARs have a separate on-disk SHA-256 cache.

Readiness and failures

Java block ready marks readiness. Pending or failed compilation stops the current trigger invocation, including on load. There is no server-tick wait or automatic event replay.

Reload the calling script after changing .jv files or includes: execution uses the snapshot captured when that script was parsed.

Type a query to search the guide.