Skip to content
Get started

Develop on the dev server

View as Markdown

You develop every Minekube game on one Paper server on your own machine. It runs the Minekube plugin and the devtools, and it stays up while you change your game. You never restart it for a game change.

Start it in its own terminal and keep it running:

Terminal window
mk server --accept-eula
What Where
Paper, a flat creative world in offline mode localhost:25569, RCON on 25575
The Effect UI devtools and their MCP server http://127.0.0.1:4774, MCP at /mcp
The server’s files server in the Minekube home (~/.minekube, or MINEKUBE_HOME)

--accept-eula accepts the Minecraft EULA when the server is created. Pass it only if you agree.

The CLI runs the server on a pinned Oracle GraalVM, which it downloads once into the Minekube home. GraalVM JIT-compiles your game’s code. --java picks another Java, and --server another server directory.

In your project, in a second terminal:

Terminal window
mk dev .

mk dev does three things:

  1. It copies the Paper types that the dev server wrote from its own jars into types/paper. Your editor, bun run check and your tests read them.
  2. It bundles src/game.ts and writes it to plugins/Minekube/games/<id>.js on the dev server. The id is the project’s folder name.
  3. It watches the project and installs again on every save.

The runtime sees the new file and swaps the game while players stay connected. A project with network/velocity.ts also gets its network bundle installed on the dev network.

Use one dev server for all your games. Each project installs under its own id, and each game runs in its own context.

Nothing of Paper’s API ships with Minekube. When the dev server starts, the runtime writes the types of the server it runs on into plugins/Minekube/types: every class from Paper’s jars with its real names, overloads and nullability, and Schemas for Java values such as java.util.UUID. mk dev . copies them into your project. Never edit types/paper; it is replaced on the next copy.

Until the dev server has started once, mk dev stops with a message that asks you to start it.

The runtime reports in the mk server terminal and in logs/latest.log in the server directory. To also see its messages in chat, prefixed [games], make yourself an operator: type op <your name> in the mk server terminal.

The runtime messages reference lists every message and what to do about it. The devtools show the game’s own messages, Commands and Models.

The dev server listens on your machine only. To let friends join it without an open port, put it in a network you own:

Terminal window
mk server --join my-network

Let servers in explains what this changes.

Was this helpful?