Skip to content

metashiyun/lapis-lazuli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

45 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Lapis Lazuli icon
Lapis Lazuli

npm version PyPI version

Lapis Lazuli is a Minecraft plugin SDK for TypeScript, JavaScript, and Python. You write plugins against the Lapis SDK, bundle them, and run them through the Lapis runtime plugin on Bukkit-family servers. TypeScript bundles can target the embedded js runtime or a real external node runtime.

Quick Start

Create a plugin project:

npx create-lapis-lazuli /absolute/path/to/my-plugin
npx create-lapis-lazuli /absolute/path/to/my-node-plugin "My Node Plugin" node
npx create-lapis-lazuli /absolute/path/to/my-python-plugin "My Python Plugin" python

The generated TypeScript starter installs lapis-lazuli from npm and imports it as lapis-lazuli. The generated Python starter installs lapis-lazuli from PyPI and imports it as lapis_lazuli.

If you are adding Lapis to an existing plugin project instead of scaffolding a new one, install the SDK from the public registry for your language:

npm install lapis-lazuli
python -m pip install lapis-lazuli

If a bundle uses engine: "node", the server host must also have a node executable available. The Bukkit runtime defaults to node on PATH, and you can override that in plugins/LapisLazuli/config.yml.

Validate and bundle it:

npx create-lapis-lazuli validate /absolute/path/to/my-plugin
npx create-lapis-lazuli bundle /absolute/path/to/my-plugin

Install these into your server:

https://github.com/metashiyun/lapis-lazuli/releases/latest/download/lapis-runtime-bukkit.jar -> <server>/plugins/lapis-runtime-bukkit.jar
/absolute/path/to/my-plugin/dist/<plugin-id>/ -> <server>/plugins/LapisLazuli/bundles/<plugin-id>/

Build the runtime from source only when you are developing this repository itself:

bun install
./gradlew :runtimes:jvm:bukkit:shadowJar

Development Checks

bun test
./gradlew :runtimes:jvm:core:test :runtimes:jvm:bukkit:compileKotlin
PAPER_SERVER_JAR=/absolute/path/to/paper.jar bun run test:paper-smoke

Docs