A PHP library for all things Minecraft: Java Edition.
You'll need PHP (CLI), Composer, and Git.
apt-get -y install php-cli composer git
Table of Contents
Using Phpcraft as a library
Thanks to Composer, using Phpcraft as a library is really easy. Just head into your project folder and run:
composer require craft/core --no-suggest --ignore-platform-reqs
Next, we'll run a self check:
If any dependencies are missing, follow the instructions, and then run the self check again.
Finally, you can
require "vendor/autoload.php"; to use Phpcraft's many APIs.
You can use modules to extend the functionality of Phpcraft:
Projects using Phpcraft
- Phpcraft Server
- Phpcraft Client
- Phpcraft Toolbox — CLI tools
- Phpcraft Surrogate — reverse proxy
- mcverify — a REST API for linking your users' Minecraft accounts
- Phpcraft Proxy
- Thanks to wiki.vg and the people who're maintaining it.
- Thanks to Jetbrains for providing me with an open-source license for PhpStorm — it's a lovely PHP IDE, and made working on this project much easier.
Phpcraft is not partnered or associated with Microsoft or Mojang.