- A bash shell (git bash is sufficient for Windows)
git
available in your shell- PHP 7.3 or newer available in your shell
composer
available in your shell
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
.
git clone --recursive https://github.com/pmmp/PocketMine-MP.git
composer install
git checkout <branch to checkout>
git submodule update --init
- Re-run
composer install
to synchronize dependencies.
- Add the flags
--no-dev --classmap-authoritative
to yourcomposer install
command. This will reduce build size and improve autoloading speed. - Preprocess the source code by running
build/preprocessor/PreProcessor.php
. Usage instructions are provided inbuild/preprocessor/README.md
.
Preprocessor requires that the cpp
(c preprocessor) is available in your PATH.
Run build/server-phar.php
using your preferred PHP binary. It'll drop a PocketMine-MP.phar
into the current working directory.
You can also use the --out
option to change the output filename.
Run src/pocketmine/PocketMine.php
using your preferred PHP binary.