EcmaCraft

Introduction

Build Minecraft plugins with TypeScript using EcmaCraft

EcmaCraft is a TypeScript-first toolchain for creating Paper/Spigot plugins.

It combines:

  • a Java host plugin runtime,
  • generated Spigot types for editor support,
  • a CLI for local development and production builds.

Documentation

Suggested Reading Order

  1. Start with Getting Started
  2. Read CLI Reference
  3. Configure local server behavior in Configuration

The configuration guide includes development.serverProperties, which lets you control seed, online/offline mode, ports, and other server.properties values from TypeScript config.

Quick Example

import { type PluginContext, Event, type SpigotEventType } 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());
}

On this page