rune

docs · getting started

Quickstart.

You'll install Rune onto a Paper server, scaffold a new script, write a join announcer, and reload it without restarting the server.

Prerequisites

  • Paper 1.21 or newer on Java 21+.
  • The rune CLI on your PATH (curl -fsSL runemc.dev/install.sh | bash on macOS or Linux; irm runemc.dev/install.ps1 | iex on Windows).

1. Install Rune onto the server

Drop the Rune jar into plugins/ and start the server once. Rune creates plugins/Rune/scripts/ on first load and writes out bukkit.d.ts by reflecting the classpath you're actually running on.

cd your-paper-server
cp ~/Downloads/Rune-*.jar plugins/
java -Xmx2G -jar paper.jar nogui   # let it boot once, then stop

2. Scaffold a script

From inside the scripts directory, ask the CLI to scaffold a new Rune. It writes a working index.ts, a rune.toml, and a per-script rune.jsonc.

cd plugins/Rune/scripts
rune init --name hello --language typescript
cd hello

3. Write a join announcer

Open index.ts. The scaffold gives you a working example; replace it with this:

@Listener
export class HelloListeners {
  @EventHandler(Events.PlayerJoinEvent)
  onJoin(e: PlayerJoinEvent) {
    const name = e.getPlayer().getName();
    rune.broadcast(`<gradient:#9b87f5:#5b3df5>${name}</gradient> joined.`);
  }
}

Three things are happening here. @Listener tells the host to register every @EventHandler method on this class as a Bukkit listener. PlayerJoinEvent is a real Bukkit type — your IDE autocompletes against the classes that actually exist on this server, including any plugins you've declared. rune.broadcast takes a MiniMessage template; the gradient tag renders inline in chat.

4. Reload

From the server console, run /rune reload. The host tears down its Node isolate, rebuilds it, replays your scripts, and re-registers their handlers. There's no need to stop and restart Paper.

5. Watch it run

Join the server. The first player to log in triggers your handler; the broadcast lands in everyone's chat. From here, the rest of the docs are a tour of features: commands, menus, persistence, and HTTP servers — all in the same process as the server.