Security and restrictions
What the policy checks and why it does not replace process isolation.
What is checked
After compilation, the addon validates every generated class, including nested classes and lambda targets. None is defined before validation finishes. The class loader also restricts available types.
The default policy permits common Java language types, selected collections, math and time APIs, Bukkit/Paper, Adventure, and the context bridge. Library package prefixes need explicit administrator approval.
Restricted direct calls
- Filesystem and network access.
- Reflection, dynamic class loading and low-level internal APIs.
- Process execution and JVM shutdown.
- Thread/executor creation and parallel streams.
- Some standard utilities capable of opening files indirectly.
A string literal containing System.exit() is not a call. Validation examines compiled operations, including method references.
The allow-system-io setting
allow-system-io: false
Setting it to true significantly broadens class access for trusted scripts. Direct reflection, process and JVM-shutdown operations remain restricted. Restart the server after changing policy.
Security boundary
Infinite loops, large memory allocations, and operations through approved privileged APIs are not isolated. Hostile code would require a separate process and narrow RPC interface without Bukkit objects.
Only trusted administrators should edit Java scripts or approve dependencies. Policy checks do not replace source review.