C++ API
Build Endstone plugins in C++
Write plugins in C++ against the Endstone API - native performance and direct low-level access, built with CMake. Start with project setup, then work through the building blocks below.
Getting started
Project setup
Set up a C++ project and the ENDSTONE_PLUGIN macro.
Plugin basics
The onLoad / onEnable / onDisable lifecycle and the logger.
API reference
Browse the full C++ API surface.
Commands & events
Registering commands
Define and register commands players can run.
Permissions
Gate commands and features behind permissions.
Event listeners
Listen for and handle server events.
Scheduling tasks
Run delayed and repeating tasks with the scheduler.
Gameplay
Working with players
Message, move, and manage the players on your server.
Worlds and dimensions
Reach the level, its dimensions, and locations.
Blocks
Read and place blocks with custom block states.
Inventory and items
Build item stacks and manage player inventories.
User interface
Messages & text
Send text and colour it with Minecraft formatting codes.
Forms
Show interactive forms to players.
Boss bars
Show a progress bar at the top of players' screens.
Scoreboards
Track scores and show per-player sidebars and name tags.
Data and distribution
Configuration
Store settings and data in the per-plugin data folder.
Databases
Back a plugin with a database without blocking the server.
Publishing
Package and distribute your compiled plugin.