Pre-requisites
Before building PocketMine-MP, ensure you have the following installed:- A bash shell (git bash is sufficient for Windows)
gitavailable in your shell- PHP 8.2 or newer available in your shell
composeravailable in your shell
Custom PHP Binaries
Because PocketMine-MP requires several non-standard PHP extensions and configuration, PMMP provides scripts to build custom binaries for running PocketMine-MP, as well as prebuilt binaries.- Prebuilt binaries
- Compile scripts are provided as a submodule in the path
build/php
If you use a custom binary, you’ll need to replace
composer usages in this guide with path/to/your/php path/to/your/composer.phar.Setting Up Environment
Checking Out a Different Branch
Building PocketMine-MP.phar
Runcomposer make-server using your preferred PHP binary. It’ll drop a PocketMine-MP.phar into the current working directory.
--out option to change the output filename:
Optimizing for Release Builds
For production deployments, add the flags--no-dev --classmap-authoritative to your composer install command. This will reduce build size and improve autoloading speed.