Anvil
Building blocksEnvironmentsPlatformsServers

Overview

Declare world servers and install the platform unit for Paper, Spigot, or NeoForge.

A MinecraftServer runs a world and its server plugins or mods. It can be the scenario entrypoint or a backend registered with one or more proxies.

Choose a server platform

PlatformGradle plugin IDDistribution
Paperme.whereareiam.anvil.platform.paperPaperMC Fill version and build
Spigotme.whereareiam.anvil.platform.spigotGetBukkit version and SHA-256
NeoForgeme.whereareiam.anvil.platform.neoforgeMinecraft version and NeoForge release

Apply the unit at the same Anvil version as the main plugin. Each unit includes its platform's agent, which enables native server observations and operations: the Bukkit agent for Paper and Spigot, and the NeoForge agent for NeoForge.

Configure shared server behavior

Each server declares a unique name, platform, and distribution. The default heap is 1024 MiB and onlineMode defaults to false. Use .memoryMegabytes(...), .onlineMode(...), and .jvmArgument(...) for process-specific choices.

A server's .setting(key, value) entries update server.properties. Install other configuration files using workspace assets. Anvil applies its listener, authentication, EULA, and forwarding values after assets are prepared; those runtime values take precedence. Existing unrelated configuration values are retained, while formatting and comments may change when a file is serialized.

Add the server with .server(server) on the scenario. For a direct environment, set .entrypoint(server.getName()); for a proxied environment, use the proxy topology guide. Only Paper and Spigot servers can be proxy backends.

On this page