Typed Spigot API
Work with generated event and runtime types so handlers are autocomplete-friendly and safer to refactor.
TypeScript-first Minecraft plugin development
EcmaCraft lets you write plugin logic in TypeScript, bundle with esbuild, and run through a Java host plugin powered by GraalVM.
Quick Start
$ pnpm create ecmacraft
$ cd my-plugin
$ pnpm devExample Plugin
import {
type PluginContext,
type SpigotEventType
Event,
} from 'ecmacraft';class LightningStriker { @Event('PlayerToggleSneakEvent') onSneak(event: SpigotEventType<'PlayerToggleSneakEvent'>) { if (!event.isSneaking()) return; const player = event.getPlayer(); player.getWorld().strikeLightning(player.getLocation()); }}export default function main(ctx: PluginContext) { ctx.registerHandlers(new LightningStriker());}A focused toolchain for strongly typed APIs, fast local iteration, and clean builds.
Work with generated event and runtime types so handlers are autocomplete-friendly and safer to refactor.
Use ecmacraft dev for live bundling + server reload, and ecmacraft build to produce production jars.
Bootstrap a plugin project with create-ecmacraft and start coding immediately with sensible defaults.
Step 1
Scaffold a new plugin with starter config, scripts, and TypeScript entrypoint.
Step 2
Run ecmacraft dev to rebuild on change and trigger server/plugin reload commands.
Step 3
Build a minified bundle and package it into dist/ecmacraft.jar for deployment.