Choose a runtime

Rune loads scripts from one Paper server directory. Choose the language and host features your script needs.

Language support

Python on CPython

Install Python 3 on the server. Set RUNE_PYTHON to an absolute interpreter path if you use a separate environment. Each Rune receives event and command snapshots asynchronously.

from rune import broadcast, on

@on("PlayerJoinEvent")
def welcome(event):
    broadcast(f"Welcome, {event['player']['name']}!")

Python handlers react to events after dispatch. Use the Node.js runtime when a handler must modify or cancel a live Bukkit event inline.

TypeScript and JavaScript on Node.js

Rune embeds libnode in the Paper JVM. Scripts can call live Paper objects through the native bridge. TypeScript can use generated classpath types and decorators.

rune.on(Events.PlayerJoinEvent, (event) => {
  const player = event.getPlayer();
  rune.adventure.send(player, rune.adventure.text("Welcome!", "gold"));
});

Use the Adventure and primitives guide for chat, sounds, titles, common Paper classes, and safe text interpolation.