Create a plugin from the template
The repository ships a dotnet new template in templates/ramjet-plugin/. It creates a ready-to-build class library with the right project settings, a small plugin class, a plugin.json, and an AGENTS.md for AI coding agents.
Install the template locally
Section titled “Install the template locally”From a checkout of the repository:
# Windowspowershell -ExecutionPolicy Bypass -File templates/install.ps1# Linux / macOSsh templates/install.shBoth run dotnet new install templates/ramjet-plugin --force, so there is nothing to pack or publish. To remove it again, pass -Uninstall / --uninstall.
If you prefer a NuGet package (to hand the template to others), pack it and install the .nupkg:
dotnet pack templates -c Release -o artifactsdotnet new install artifacts/Ramjet.Templates.1.0.0.nupkgCreate the project
Section titled “Create the project”dotnet new ramjet-plugin -n Homes --Author "Ahmed" --PluginDescription "Set and teleport to homes"cd Homes| Option | Default | Effect |
|---|---|---|
-n, --name |
MyPlugin |
assembly, namespace and plugin name; also the lower-cased id in plugin.json |
--Author |
Your Name |
[PluginInfo(Author = ...)] and plugin.json |
--PluginDescription |
A plugin for ramjet. |
[PluginInfo(Description = ...)] and plugin.json |
--RamjetApiVersion |
1.0.0-preview.1 |
version of the Ramjet.Api package the project references |
The API package
Section titled “The API package”The project references Ramjet.Api, the plugin API as a NuGet package. It holds a reference assembly: every public type and member
of the API, with its documentation (IntelliSense), and no code. Your plugin compiles against it, and the server supplies the real API when
it loads the plugin, so nothing from the package is copied next to your dll. You don’t need a server build to compile a plugin.
The package also sets up the project:
EnableDynamicLoadingand implicit usings, so each plugin loads into its own unloadable context;- global usings for the API namespaces (
Mc.Scripting,Mc.Scripting.Commands,Mc.Scripting.Events, …). SetRamjetGlobalUsingstofalseto turn them off; - the deploy step described below.
Until the package is on nuget.org, add the folder that holds Ramjet.Api.<version>.nupkg as a package source, once:
dotnet nuget add source /path/to/folder-with-the-nupkg -n ramjet# from a checkout of the repository, build that folder first:dotnet pack sdk/Ramjet.Api -o artifacts/sdkOptional: point the build at a server’s plugins folder, and every build copies the plugin there, which triggers the server’s hot reload:
export RAMJET_PLUGINS=/path/to/run/pluginsPowerShell: $env:RAMJET_PLUGINS = 'C:\path\to\run\plugins', or per build: -p:RamjetPluginsDir=....
dotnet build -c Release Homes -> .../bin/Release/net10.0/Homes.dll Homes deployed to /path/to/run/plugins/Homes/The second line appears only when RAMJET_PLUGINS (or RamjetPluginsDir) is set. Continue with the project layout to see what the template produced, or jump to build and hot reload to watch the plugin load.