Platform version
A project names the version of each platform its bundles run on, in vite.config.ts: paper: { version: "26.3" } for its games, velocity: { version: "4.3.1" } for its proxy bundles. It works like a Cloudflare compatibility date: the code says which API it was written against, and nothing changes under it until you change that line.
What the version decides
Section titled “What the version decides”- The types.
mk types(andmk devfirst) downloads exactly that build from PaperMC and generatestypes/paperandtypes/velocityfrom its own jars, with the generator the Minekube plugin uses on a running server. A game sees the API of that version: its classes, overloads and nullability, nothing newer. - Other plugins’ APIs.
plugins: ["net.luckperms:api:5.5"]next to the version adds the API of another plugin on the server to the same types, from its API jar on Maven. See Other plugins’ APIs. - The dev server.
mk server, started in the project folder, runs that version, so what the types promise is what the server has. - Each build.
dist/minekube.jsonrecords every bundle with its platform and version, and the Minekube API keeps it with the version you deploy. - Deploys.
mk deploycompares it with the version each server of the target runs, which the registry knows as the labelminekube.com/version, and lists the servers that run another one.
The format
Section titled “The format”The version is the one PaperMC uses on its downloads page: Paper’s Minecraft version (26.3, 1.21.8) and Velocity’s own (4.3.1, 3.4.0-SNAPSHOT). Without a build, it is the newest stable build of that version. build pins one, as paper-26.3-273.jar names it:
paper: { version: "26.3", build: 273 },Why per platform, not per bundle
Section titled “Why per platform, not per bundle”All Paper bundles of a project share one types/paper, run on the one dev server, and deploy as one version to the same servers. A version per bundle would let two of them disagree about the one server they share, so the version belongs to the platform, once per project. Bundles that need different Paper versions are different projects.
Why a warning, not a refusal
Section titled “Why a warning, not a refusal”A bundle built for one Paper version usually runs on the next: Paper rarely removes API. A network that updates its servers one at a time also has two versions side by side for a while, and still needs to deploy. So mk deploy (and mk versions deploy and mk rollback, for a version of any age) deploys and lists the servers that run another version, and the connector of such a server installs the bundle with a warning in its log. --strict-versions, or strictVersions: true on a target, refuses instead.
Where the types come from
Section titled “Where the types come from”Nothing of Paper’s or Velocity’s API ships with Minekube. mk downloads a build once into the Minekube home (~/.minekube), checked by the SHA-256 PaperMC publishes, then and on every later use. For Paper it lets Paper’s own launcher fetch and patch the Minecraft server and its libraries, exactly as a server starts. It generates the types once per build into ~/, shared by every project, and copies them into the project. A server of the same build writes the same types at start, byte for byte.
Related
Section titled “Related”- Change the platform version: update a project, step by step.
- Vite plugin and configuration: every field of
minekube(). - Paper from TypeScript: how a game calls the API the types describe.
Was this helpful?
Thanks for the feedback.