Skip to main content

Your first script

Create a file in config/questscript/scripts/. Your selected language tab is remembered and applied to other synchronized examples.

welcome.js
world.afterEvents.playerJoin.subscribe((event) => {
world.getPlayer(event.playerId)?.sendMessage('Welcome to the server!');
});

Load the file with:

/qs load welcome.js

Use welcome.py for Python.

Python API

Python type stubs describe the snake_case Python projection of the shared API; JavaScript declarations use camelCase. Events, players, world access, inventory, and scheduling retain the same semantics in both languages.