Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 2.56 KB

index.md

File metadata and controls

37 lines (29 loc) · 2.56 KB

Build a plugin, one chapter at a time

This guide builds Session Journal, a plugin that counts connection sessions. It stores the count, adds a local command, and exposes a Beacon function. You can test it without a Minecraft account or server.

A plugin is code that a host loads into its own process. The host creates the client and selects its modules. The plugin receives services through PluginContext. It does not own the client's connection.

Follow the chapters in order. The complete sample contains the final files. The verification program exercises them through the real plugin loader.

Chapter Result
1. Prepare the project A library project with the author SDK
2. Understand the entry class A counter that reacts to each session
3. Add settings and storage A validated option and a persistent count
4. Add commands and text A localized command and a manual
5. Connect Beacon A script reads the count
6. Load and test Executable checks for source loading and session ownership
7. Package compiled output A portable compiled asset
8. Maintain the plugin A method for debugging and safe updates

The guide uses .NET 10, DMCBK 0.1.0-preview.8, UMPK 0.9.0-beta.7, API 1.0, and manifest schema 2. Pin these versions while following it.

Words used in this guide

Word Meaning
Host The application that creates a DMCBK client and loads plugins
SDK The author contracts supplied by DMCBK.PluginSdk
Manifest The plugin.toml file that describes one package
Session One connection, from creation to disconnection
Registration A command, callback, function, or service attached to an owner
Scope An owner that removes its registrations when its lifetime ends
Source asset A package with one C# entry file that the runtime compiles
Compiled asset A package with an entry DLL built by the author
Capability A named feature that a plugin or script requires
Runtime target The operating system and process architecture used to select an asset

You need basic C# knowledge: classes, methods, variables, events, and asynchronous methods. The guide explains DMCBK concepts as they appear. Learn the C# concepts first if their syntax is unfamiliar.