mcmodwiki
Plugins › OpenJS › Guides › OpenJS: Server Scripting and Instant JavaScript Execution

OpenJS: Server Scripting and Instant JavaScript Execution

A OpenJS guide. Covers OpenJS 1.5.0.

OpenJS allows server developers to implement custom server features, interactive interfaces, and automated routines using JavaScript on Spigot, Paper, and Folia servers. Instead of compiling Java archives and restarting the server for minor adjustments, developers can write scripts, save code changes, and execute logic live in game environments.

Developing Server Logic and Hot Reloading Scripts

The framework supports creating custom commands, graphical inventory menus, and event handlers backed by accessible script APIs. Developers can integrate with external plugins including ProtocolLib and PlaceholderAPI to read variables and handle packet events directly from JavaScript logic.

Because OpenJS supports dynamic script refreshing, administrators can modify script files on disk and trigger updates instantly without restarting the server. Executing /openjs, /oj, or /openjavascript accesses the primary command interface to manage loaded scripts, evaluate functions, and trigger live reloads during testing.

Access Restrictions and Operator Configuration

Because executing arbitrary JavaScript provides direct access to server mechanics, access to the command suite must remain tightly secured. All OpenJS permissions default to op.

The primary permission node openjs.use governs entry to the core command structure across /openjs, /oj, and /openjavascript. Server owners who want to give senior developers unhindered authority over script execution, reload routines, and subcommands can assign the parent wildcard node openjs.* (default op). Ordinary players should have no permissions granted, ensuring that custom scripting remains strictly under administrative control.

In the data pages: OpenJS commands and permissions

Plugins › OpenJS › Guides › OpenJS: Server Scripting and Instant JavaScript Execution