minecraft-api
Contents of the docs

minecraft-api · Docs

Installation

Download minecraft-api as a JAR or build it yourself and put it into the mods folder of the server.

On this page

The mod runs on the server. It adds no blocks, items or network channels and needs no other mods besides NeoForge.

Requirements

  • Minecraft server 1.21.8 with NeoForge 21.8.33 or newer
  • Java 21 (required for NeoForge 1.21.8 anyway)
  • a free port for the API, 9874 by default

Download the JAR

Releases has the ready-made file minecraft_api-<version>.jar. Put it into the mods/ folder of the server and restart it.

Build it yourself

git clone https://github.com/DasRed/minecraft-api.git
cd minecraft-api
./gradlew build

The file is then in build/libs/minecraft_api-<version>.jar.

Check

After the start the server log shows:

[MinecraftAPI] API started at port 9874

A request returns players and dimensions:

curl http://localhost:9874/

Warning

The API has no authentication. Do not expose the port to the internet, see Configuration.