# PaperScript
Write **Minecraft server plugins in JavaScript/TypeScript**. A host plugin embeds a JS engine and loads scripts from a folder, exposing a small typed API (`ps`) with hot reload.
## Two lines, one API
| Minecraft | Java | Engine | Jar |
|-----------|------|--------|-----|
| Paper 1.18 - 1.21 | 17 / 21 | GraalJS | paperscript-host |
| Paper 1.12.2 / 1.16.5 | 8 / 11 | Nashorn | paperscript-legacy |
## Example
```ts
ps.onEnable(() => {
ps.commands.register('hello', (ctx) => {
ctx.sender.sendMessage('Hello, ' + ctx.sender.name + '!');
});
ps.events.onPlayerJoin((e) => e.player.sendMessage('Welcome!'));
});
```
- Typed SDK: `npm i -D @paperscript/sdk`, scaffold with `npx paperscript init`
- MiniMessage chat (modern) / legacy &-codes (legacy)
- Hot reload via `/ps reload ` — no server restart
- Sandboxed scripts: no Java.type, no host IO, main-thread only
Full docs: https://darkpix.ru/paperscript/docs
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.12.2, 1.16.5, 1.18
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Hangar — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
PaperScript is a free Minecraft Java mod. Compatible with Minecraft 1.12.2, 1.16.5, 1.18, 1.18.1 and newer. Downloaded 4 times (via Hangar). Download it and open it directly in the game.