Skip to content

Install .NET and the server

Plugins target net10.0, and the server embeds the .NET 10 runtime (CoreCLR through hostfxr), so you need the .NET 10 SDK on the machine that builds the plugin and the same major runtime on the machine that runs the server.

Terminal window
dotnet --list-sdks # must list a 10.x entry

If it does not, install it from dotnet.microsoft.com (Windows installer, winget install Microsoft.DotNet.SDK.10, or your Linux package manager). The server finds the runtime itself (DOTNET_ROOT, the Windows registry, /etc/dotnet/install_location, the default install paths); you do not need to configure anything.

There is no binary release yet: you build Ramjet from the repository. You need CMake, Ninja and GCC (MinGW-w64 on Windows), see Install and run for the full toolchain.

Terminal window
cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
cmake --build build

When the configure step finds a .NET 10 SDK it turns MC_BUILD_SCRIPTING on and also builds the managed side next to the server:

build/bin/ramjet(.exe)
build/bin/dotnet/Mc.Scripting.Api.dll <- the plugin API the server loads (plugins compile against the Ramjet.Api package)
build/bin/dotnet/Mc.Scripting.Runtime.dll <- plugin host, loaded by the server
build/bin/dotnet/samples/HelloPlugin/ <- the sample plugin

If the configure step printed scripting: no .NET 10+ SDK found, install the SDK and configure again.

You do not need this build to write a plugin. Plugin projects compile against the Ramjet.Api NuGet package (see create a plugin); the server needs its own build to run them.

Create a folder to run in (it holds server.properties, the world and the plugins) and start the server with --plugins:

Terminal window
mkdir run && cd run
../build/bin/ramjet --data-dir ../data --plugins plugins
  • --plugins <dir> turns scripting on: the folder is created if missing, every plugin in it is loaded, and the folder is watched for changes (hot reload). Without the flag, no .NET runtime is started at all.
  • --data-dir points at the vanilla data of the repository (data/, containing vanilla/).
  • The server binds 127.0.0.1 by default and listens on 25567 unless you set server-port in server.properties or pass --port. See server.properties.
  • Console commands: stop, list, help.

Look for these lines in the log:

scripting: .NET runtime started (.../build/bin/dotnet)
[HelloPlugin] enabled v1.0.0 (id 1)

To try the sample, copy build/bin/dotnet/samples/HelloPlugin/HelloPlugin.dll into run/plugins/. Next: create your own plugin from the template.