Change the platform version
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.
1. Pick the version
Section titled “1. Pick the version”Find the version on PaperMC’s downloads page for Paper or Velocity, and write it into 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.
2. Generate the types
Section titled “2. Generate the types”mk typesmk 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 ..
3. Let the type check show what broke
Section titled “3. Let the type check show what broke”bun run checkEvery 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.
4. Run the dev server on the new version
Section titled “4. Run the dev server on the new version”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.5. Deploy
Section titled “5. Deploy”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.3They 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.
Related
Section titled “Related”- Platform version: what the version decides, and why it is per platform.
- Deploy a version: the first deploy.
- Supported platforms: the Paper and Velocity versions the Minekube plugin runs on.
Was this helpful?
Thanks for the feedback.