Skip to content
Get started

Change the platform version

View as Markdown

A project builds for the platform version its vite.config.ts names. mk init writes the newest stable one when it creates the project, and nothing changes it after that. To move to another version, change it yourself.

Find the version on PaperMC’s downloads page for Paper or Velocity, and write it into vite.config.ts:

vite.config.ts
minekube({
bundles: { arena: { platform: "paper", entry: "src/game.ts" } },
// Was "1.21.8".
paper: { version: "26.3" },
});

Add build to pin one build of it, such as build: 273. Without it, mk takes the newest stable build.

A new project can start on any version: mk init --paper 1.21.8 my-game, and --velocity 4.3.1 with --proxy.

Terminal window
mk types

mk types downloads that build from PaperMC once and generates types/paper from its jars, without a server. It needs no network for a build it generated before. mk dev does the same before it builds, so this step is also what happens on the next mk dev ..

Terminal window
bun run check

Every call into an API the new version changed or removed is a type error now, before any player sees it. Fix them, then run your tests: bun test.

Stop mk server and start it again in the project folder. It downloads the version the project names and upgrades the world on start. mk dev . warns while the dev server still runs another version:

The dev server last started with Paper 1.21.8 build 60, vite.config.ts names 26.3: start `mk server` again in the project to run it.

mk deploy lists the servers of the target that run another version than the bundles are built for, by the registry’s minekube.com/version label, and deploys anyway:

Warning: A server of prod (every server in play) runs another platform version than the bundles were built for:
3f9c2a1b7d4e online paper 1.21.8: arena is built for 26.3
They get the bundles anyway and their connectors warn; --strict-versions refuses instead.

Update those servers, or deploy with --strict-versions (or strictVersions: true on the target) to refuse while any server runs another version. mk versions list shows each bundle with the version it was built for.

Was this helpful?