A starter template for building Endstone plugins in C++. Endstone is a plugin framework for Minecraft Bedrock Dedicated Server, similar to Bukkit/Spigot/Paper for Java Edition. This template demonstrates commands, events, and permissions.
- Click Use this template on GitHub (or fork/clone it)
- Rename the following to match your plugin:
| What | Where | Example |
|---|---|---|
| Project name | CMakeLists.txt project(...) |
project(my_plugin CXX) |
| Plugin metadata | src/plugin.cpp ENDSTONE_PLUGIN(...) |
"my_plugin", "0.1.0", MyPlugin |
| Plugin class | include/plugin.h class name |
MyPlugin |
| Prefix | src/plugin.cpp prefix = ... |
"MyPlugin" |
| Permission prefix | src/plugin.cpp permission names |
my_plugin.command.* |
- Update
ENDSTONE_API_VERSIONinCMakeLists.txtto the Endstone version you target - Delete the example command/listener code and start building
Windows: Visual Studio 2019 or newer with the "Desktop development with C++" workload. CMake is included with Visual Studio, or install it separately from cmake.org.
Linux: Clang 15+ with libc++. Install via apt.llvm.org:
# Install CMake and Ninja
sudo apt-get install -y cmake ninja-build
# Install LLVM/Clang (replace 18 with desired version)
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -y libc++-18-dev libc++abi-18-devgit clone https://github.com/EndstoneMC/cpp-example-plugin.git
cd cpp-example-pluginWindows:
cmake -B build
cmake --build build --config ReleaseLinux:
CC=clang-18 CXX=clang++-18 cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildinclude/
plugin.h Plugin lifecycle, commands
listener.h Event listener (player join/quit)
src/
plugin.cpp Plugin metadata, command and permission declarations
After building, copy the output binary to your server's plugins/ folder:
- Windows:
build/Release/endstone_cpp_example.dll - Linux:
build/endstone_cpp_example.so
Restart the server to load the plugin.
This template includes a GitHub Actions release workflow. To make a release:
- Add your changes under
## [Unreleased]inCHANGELOG.md - Go to Actions > Release > Run workflow
- Enter the version (e.g.
0.1.0) and run
The workflow validates the version, updates the changelog, creates a git tag and GitHub release, builds for both Windows and Linux, and attaches the binaries to the release.
Use dry run to preview without making changes.
GLIBC_2.xx not found when loading the plugin on Linux
Plugins are linked against glibc at build time and require the same or newer version at runtime. A plugin built on Ubuntu 24.04 will not load on a server running Ubuntu 22.04.
To maximize compatibility, build on an older OS. GitHub Actions runners (Ubuntu 22.04) are a good default for this reason.
For more on the Endstone API, see the documentation.