# Platforms

> Which platforms run Minekube bundles today (Paper, Velocity and the Minecraft client with Fabric), which ones the same core could run, such as Minestom or Fabric and NeoForge servers, and what it takes to add one.

Minekube Games has no common API across platforms. It has one runtime model, and a runtime per platform that gives your code that platform's own API. A game on Paper sees Paper's classes, a proxy bundle on Velocity sees Velocity's, a test player in the Minecraft client sees the client's. What they share is everything around the API: bundles, swaps on save, a scope per revision, one thread, recordings, the devtools and the SDK's Effect UI components.

## Supported today

- **Paper** runs games, written with `@minekube/paper`; see [Quick start](https://minekube.com/games/quick-start). Bundles live in `plugins/Minekube/games/`, and the types come from the Paper API, Adventure, Brigadier and JOML jars. One runtime jar serves Paper 1.21 and newer: it is built against the oldest supported API and runs unchanged on newer servers. A project names the Paper version it is built for, and the dev server runs that one; see [Platform version](https://minekube.com/games/concepts/platform-version).
- **Velocity** runs proxy bundles, written with `@minekube/velocity`: a network's proxy code, such as `/lobby`, kick fallback and routing between servers; see [Proxy bundles](https://minekube.com/games/write/proxy-bundles). Bundles live in `plugins/minekube/bundles/`, typed from the Velocity API jar. Velocity finds its servers by [labels and selectors](https://minekube.com/guide/networks/labels).
- **The Minecraft client** runs test players and bots, written with `@minekube/client`. Its runtime is a Fabric mod in a real Minecraft client, 26.3 like the dev server. Bundles live in `minekube/bundles/` in the game directory, typed from the client jar, which Mojang ships unobfuscated from Minecraft 26.1 on. `mk client` starts a client that joins your dev server, and `mk daemon` runs them for tests: a bot's rules are an Effect UI component, its Commands call the client's API, and its session is recorded next to the server's. See [Devtools and agents](https://minekube.com/games/testing/bots).

## Possible with the same core

These are not built. They are listed because nothing in the core is specific to Paper, Velocity or Fabric.

| Platform | What it would bring |
| --- | --- |
| **Minestom** | Games on a server built from code, with Minestom's own types. |
| **Fabric and NeoForge servers** | Bundles on modded servers, typed from the server and the loaded mods' jars, the way the client runtime is typed from the client jar. |
| **BungeeCord and other JVM proxies** | Proxy bundles with that proxy's API. |

Two limits are worth knowing. The core hosts JavaScript in GraalJS, so it runs on JVM platforms only; a server written in another language would need its own runtime, with its own types. And the slim proxy in Rust that is planned for networks would run no JavaScript itself: its routing runs on Cloudflare, and code that intercepts packets would run in [`workerd`](https://github.com/cloudflare/workerd) next to it. Its API would be Minecraft's protocol: every packet as an Effect Schema with Mojang's names, generated from Mojang's jar. Today that generator covers 4 of 260 packets.

## What it takes to add a platform

1. **A platform adapter on the runtime core.** It tells the core how to load the platform's classes for bundles, which thread is the main thread and how to run work on it, and how to tell developers about installs and failures. Next to that, a host object adds what the platform's API does not offer a bundle by itself, such as registering for events and scheduling tasks, and registers each of them with the core, so they end with the revision. Paper's adapter is about 150 lines of Kotlin.
2. **Types from the platform's jars.** The shared generator reads the public classes of the jars you name, with nullability and declared exceptions from the bytecode, and writes TypeScript declarations and Schemas. Choosing the jars is the platform-specific part.
3. **A small SDK module.** It mounts an Effect UI component on the platform and turns the platform's events into Messages. Converting Java values is shared between all SDKs.
4. **Optionally, the connector.** For a server or proxy that players should reach through relays, the connector is injected into the platform's network pipeline, as it is in Paper and Velocity. See [Connector, relay and API](https://minekube.com/guide/networks/connectivity).

No game feature belongs in an adapter. If a platform's runtime needs code for a particular game, event or menu, the adapter is wrong.

To run Paper servers for players, see [Hosting](https://minekube.com/cloud/).
