Welcome to the example C++ plugin for Endstone servers.
- Visual Studio 2017 or newer
- Clang 15 or higher
- libc++ installed
cpp-example-plugin/
βββ include/ # Header files for the plugin
β βββ example_listener.h # Header for the ExampleListener class
β βββ example_plugin.h # Header for the ExamplePlugin class
β βββ fibonacci_command.h # Header for the FibonacciCommand class
βββ src/ # Source files for the plugin
β βββ example_plugin.cpp # Source and metadata for the plugin
βββ .clang-format # Configuration for Clang format rules
βββ .gitignore # Git ignore rules
βββ CMakeLists.txt # CMake configuration for building the plugin
βββ LICENSE # License details
βββ README.md # This file
-
Clone this Repository
git clone https://github.com/EndstoneMC/cpp-example-plugin.git
-
Navigate to the Cloned Directory
cd cpp-example-plugin -
Build Your Plugin
Windows:
mkdir build cd build cmake .. cmake --build . --config Release
Linux:
mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. cmake --build .
This process will compile your code and produce a shared library that Endstone servers can load.
Note: If you wish to build against a specific version of Endstone, you can modify the
GIT_TAGin theCMakeLists.txtfile to point to the desired tag or commit. -
Test Your Plugin
Once built, copy the output binary
endstone_example_plugin.dll(Windows) orendstone_example_plugin.so(Linux) to thepluginsdirectory of your Endstone server. Start the Endstone server and check the logs to ensure your plugin loads and operates as expected.
For a deeper dive into the Endstone API and its functionalities, refer to the main Endstone documentation (WIP).
This project is licensed under the MIT License - see the LICENSE file for details.