Skip to content
Get started

Platform version

View as Markdown

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.

  • The types. mk types (and mk dev first) downloads exactly that build from PaperMC and generates types/paper and types/velocity from 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.json records every bundle with its platform and version, and the Minekube API keeps it with the version you deploy.
  • Deploys. mk deploy compares it with the version each server of the target runs, which the registry knows as the label minekube.com/version, and lists the servers that run another one.

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 },

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.

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.

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 ~/.minekube/types/<platform>/<version>-<build>, 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.

Was this helpful?