Distribution and versioning
Overview
Section titled “Overview”You share a plugin as a single folder. The recipient puts that folder in the plugin folder and enables it in the Plugin Manager. This page covers the files to put in the folder, how to choose the version number and the sdk range, the compatibility promise the SDK keeps, and security.
Basic use
Section titled “Basic use”- Increment
versioninplugin.json(see “Your version number” below). - Build with
dotnet build -c Release. - From the build output folder, pick only the files in the “Files to include” table below, put them in a new folder (for example
road_tools) and zip it. - Give recipients the following steps.
- Unzip and put the
road_toolsfolder in the plugin folder (Tools > Open plugin folder). - Click Tools > Plugin Manager…. The new plugin appears as “Approval needed”.
- If you trust it, check Enable on that row. The first time, click Trusted — load in the External plugins confirmation window.
- Unzip and put the
Tips and tricks
Section titled “Tips and tricks”- Before you publish, check it yourself the way a new user would: unzip into an empty plugin folder, then Rescan → check Enable and confirm that it enables.
- If you use NuGet packages,
EnableDynamicLoadingcopies the dependency dlls into the build output. Include those dlls and<name>.deps.json. - Keep the target at
net8.0. The .NET runtime inside the editor is 8, so it cannot load a dll built for a newer target. - Put large data of your own (presets · tables) in a subfolder such as
data\and locate it withhost.PluginDir. The paths stay correct even if the whole plugin folder moves. - Keep user settings in
host.Settings. Even if someone installs over the plugin folder, the settings stay in%APPDATA%\NPEditor\plugin_settings\.
Reference
Section titled “Reference”Files to include
Section titled “Files to include”| File | Include? | Description |
|---|---|---|
plugin.json | Yes | Directly in the folder |
| Your dll | Yes | The dll path in plugin.json |
| Other dlls you use (NuGet packages and so on) | Yes | Next to your dll. Also include the .deps.json from the build output. |
.pdb | Optional | Line numbers appear in the exception stacks you log yourself (host.Log(e.ToString())). |
NP.Editor.Sdk.dll | No | The editor’s copy is used. Exclude it in the csproj with Private=false. |
| Large data | Optional | Keep it in the folder and locate it with host.PluginDir. |
road_tools\├─ plugin.json├─ RoadTools.dll├─ RoadTools.deps.json├─ RoadTools.pdb└─ data\ └─ presets.jsonThe editor also reads plugins placed in the plugins\ folder under the editor install folder. If the user plugin folder has the same id, that one comes first.
Your version number (version)
Section titled “Your version number (version)”Increment version in plugin.json following semver (major.minor.patch). It appears in the Version column of the Plugin Manager.
| What changed | Part to increment | Example |
|---|---|---|
| Bug fixes only | patch | 1.2.0 → 1.2.1 |
| Added features (save format and commands unchanged) | minor | 1.2.1 → 1.3.0 |
| Changed command names · world logic types · settings keys · save format | major | 1.3.0 → 2.0.0 |
- World logic
Typeand fieldNamevalues are saved in the map’sscene.json. If you change them, rules in old maps become “Unknown type”. - Do not change the
id. Settings files, shortcuts the user changed and approval records are saved byid.
sdk range
Section titled “sdk range”Set sdk to the minimum version of the features you actually use.
| What you use | sdk | Editors it runs on |
|---|---|---|
| SDK 1.0 features only | ^1.0 | All of SDK 1.0 – 1.x |
Settings · Draw · AddShortcut | ^1.1 | SDK 1.1 – 1.x |
AddSceneEvent | ^1.2 | SDK 1.2 – 1.x (editor 0.9.0 or later) |
Scene · View · ActorList | ^1.3 | SDK 1.3 – 1.x (editor 0.9.1 or later) |
Account | ^1.4 | SDK 1.4 – 1.x (editor 0.9.12 or later) |
AddShowFlag · AddStatusItem · AddWorldReplaceGuard | ^1.5 | SDK 1.5 – 1.x (editor 0.9.18 or later, including 0.10.2) |
- If you set it too high, users of older editors cannot use the plugin.
- If you set it too low, loading on an older editor fails because of missing members (“Version mismatch”).
- Do not use ranges without an upper bound (
>=1.0). The plugin could load in a broken state on the next major.
SDK compatibility promise
Section titled “SDK compatibility promise”| Promise | Details |
|---|---|
| Within the same major | Types and members are only added. They are never renamed or removed. |
| New fields | Added as trailing fields with default values. Old code compiles unchanged. |
| Breaking changes | The major is incremented (2.0). ^1.x plugins stop safely with “Version mismatch” and the editor keeps running. |
| Behavior | The meaning of registration points does not change within the same major. |
Per-version changes are in the SDK changelog.
Security
Section titled “Security”A plugin is code that runs on this computer with the same permissions as the editor, without signature checks.
| Prevented | Not prevented |
|---|---|
| An exception in plugin code → only that plugin is disabled (isolation) | Infinite loops · stack overflows · process exit |
| Cleanup of registrations, drawings and the camera for a disabled plugin | Reading · writing · deleting files |
| A new plugin folder that has not been allowed is not loaded | Network access |
- A new plugin folder loads only after the user checks Enable in the Plugin Manager. Even if another program drops a dll into the plugin folder, it does not run by itself.
- Plugin code loads only after sign-in and the license check are done.
- The tools called by the AI inside the editor (AI Studio) cannot write to the plugin folders, the install folder or
%APPDATA%\NPEditor, and cannot create executable files (.dll·.exeand so on). There is no AI tool that enables plugins. - Install only plugins you built yourself or got from a source you trust. When you share a plugin, also share the source or where it came from.
- Do not put secret keys or tokens in a plugin. A dll is easy to decompile.
- Do not use reflection by name on editor internals (non-public types · members). In the installed build, non-public names are changed (obfuscated), so such code breaks only in the installed build. Request missing features as SDK registration points.
Pre-release checklist
Section titled “Pre-release checklist”- Incremented
versioninplugin.json. -
sdkis the minimum version of the features used. - The folder does not contain
NP.Editor.Sdk.dll. - It enables with Rescan → checking Enable when placed in an empty plugin folder.
- Menus and panels are not duplicated or left behind after enable → disable → enable.
The detailed list is under “Pre-release checklist” in Troubleshooting.
Related pages
Section titled “Related pages”Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.