
PocketMine Documentation¶
Introduction¶

PocketMine-MP is a server software for Minecraft PE (Pocket Edition). It has a Plugin API that enables a developer to extend it and add new features, or change default ones.
Supported features¶
- Get all your friends in one server. Or run a public server.
- Disables flying, item hack, running & more. With an On/Off switch.
- Extend the game in the way you want, add awesome features.
- Teleport players, whitelist your server, tune the server, Remote Console.
- Load different levels at once, and teleport back and forth.
- Endless features, and we continuously implement new things.
Contact and Support¶
- PocketMine Forums
- #pocketmine for support @ chat.freenode.net
Requirements¶
PocketMine-MP.phar, the main component, is needed to run PocketMine-MP. PocketMine-MP requires a few extra extensions because of that you need a custom build PHP binary. We precompiled a few binaries. If you have problems, you could try to compile PHP with our compile script. Got problems? Contact and Support.
Supported MCPE Versions¶
To check the current PocketMine-MP supported protocol version, run the version
command in PocketMine-MP.
Running the version
command outputs:
This server is running PocketMine-MP 1.6.2dev 「Unleashed」
implementing API version 3.0.0-ALPHA5
for Minecraft: PE v1.0.7.0 (protocol version 107)
The game version reported by the server is the minimum supported version. Newer patch versions of the game are sometimes compatible with older versions, so before asking for an updated version, try and see if you can connect to your current server first. If a version is not listed here, it usually either means that there were no protocol changes between the listed versions, so look at the newest entry before your version.
Minecraft version | Protocol version |
---|---|
v1.1.0.9 | 112 |
v1.1.0.8 | 111 |
v1.1.0.0 | 110 |
v1.0.7.0 | 107 |
v1.0.6.0 | 106 |
v1.0.5.0 | 105 |
v1.0.4.1 | 102 |
v1.0.3.0 | 101 |
v1.0.0.0 | 100 |
v0.17.0.2 | 92 |
v0.16.0.5 | 91 |
v0.15.90.1 | 90 |
v0.15.10.0 | 84 |
v0.15.9.0 | 83 |
v0.15.4.0 | 82 |
v0.15.0.0 | 81 |
v0.14.3.0 | 70 |
v0.14.2.0 | 60 |
v0.14.0.7 | 45 |
v0.14.0.6 | 44 |
v0.14.0.5 | 43 |
v0.14.0.4 | 43 |
v0.14.0.3 | 42 |
v0.14.0.1 | 41 |
v0.13.2.0 | 39 |
v0.13.0.4 | 38 |
v0.13.0.3 | 38 |
v0.13.0.2 | 37 |
v0.13.0.1 | 37 |
v0.11.0.14 | 27 |
v0.11.0.11 | 26 |
v0.11.0.8 | 25 |
v0.11.0.7 | 24 |
v0.11.0.5 | 23 |
v0.11.0.4 | 22 |
v0.11.0.1 | 21 |
v0.10.0.6 | 20 |
v0.10.0.1 | 19 |
v0.9.5.0 | 18 |
v0.9.0.12 | 17 |
v0.9.0.7 | 16 |
v0.9.0.2 | 15 |
v0.8.1.0 | 14 |
v0.7.4.0 | 12 |
v0.7.0.0 | 11 |
v0.6.1.0 | 9 |
v0.6.0.0 | 9 |
v0.5.0.0 | 8 |
v0.4.0.0 | 7 |
v0.3.3.0 | 6 |
v0.3.2.0 | 5 |
v0.3.0.0 | 4 |
v0.2.2.0 | 3 |
v0.2.1.0 | 3 |
v0.2.0.0 | 2 |
v0.1.3.0 | |
v0.1.2.0 | |
v0.1.1.0 | |
v0.1.0.0 |
Installation¶
Installing on Windows¶
Download the latest PHP binary from Bintray. Use the installer to install PocketMine-MP. The installer may have an outdated version of PocketMine-MP. You can download the latest .phar from Jenkins.
Warning
If the provided x64 binary does not work then try the x86 binary.
Installing on Linux/MacOS¶
Warning
Only works on Linux or MacOS.
Use curl
or wget
to install PocketMine-MP using the following command.
curl -sL https://raw.githubusercontent.com/pmmp/php-build-scripts/master/installer.sh | bash -s -
wget -q -O - https://raw.githubusercontent.com/pmmp/php-build-scripts/master/installer.sh | bash -s -
[*] Found PocketMine-MP Final_1.5dev (build 1254) using API 1.12.0
[*] This development build was released on Sat Jun 20 09:45:04 CEST 2015
[*] Installing/updating PocketMine-MP on directory ./
[1/3] Cleaning...
[2/3] Downloading PocketMine-MP Final_1.5dev-1254 phar... done!
[3/3] Obtaining PHP: detecting if build is available...
[3/3] MacOS 64-bit PHP build available, downloading PHP_5.6.10_x86-64_MacOS.tar.gz... checking... regenerating php.ini... done
[*] Everything done! Run ./start.sh to start PocketMine-MP
Error
It is recommended to run it as a normal user as it doesn’t need further permissions.
Do not run the installer as root, this is discouraged.
Installing manually¶
Did the installer fail? It is not your taste? YOLO? DIY!
Using .phar¶
- Create a new directory for PocketMine-MP.
- Download PocketMine-MP.phar from Jenkins.
- Rename the .phar to
PocketMine-MP.phar
. - Place it in the PocketMine-MP directory you just created.
Using GitHub¶
$ git clone --recursive https://github.com/pmmp/pocketmine-mp.git pocketmine-mp.git
Cloning into 'pocketmine-mp.git'...
remote: Counting objects: 34068, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 34068 (delta 2), reused 0 (delta 0), pack-reused 34055
Receiving objects: 100% (34068/34068), 9.89 MiB | 1.79 MiB/s, done.
Resolving deltas: 100% (25602/25602), done.
Checking connectivity... done.
Submodule 'src/pocketmine/gui' (https://github.com/pmmp/pocketmine-mp-gui.git) registered for path 'src/pocketmine/gui'
Submodule 'src/raklib' (https://github.com/pmmp/raklib.git) registered for path 'src/raklib'
Submodule 'src/spl' (https://github.com/pmmp/pocketmine-spl.git) registered for path 'src/spl'
Submodule 'tests/TesterPlugin' (https://github.com/pmmp/testerplugin.git) registered for path 'tests/TesterPlugin'
Cloning into 'src/pocketmine/gui'...
remote: Counting objects: 26, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 26 (delta 4), reused 26 (delta 4), pack-reused 0
Unpacking objects: 100% (26/26), done.
Checking connectivity... done.
Submodule path 'src/pocketmine/gui': checked out 'b551c3d58ec2fd9fa0f3c92d36fcbaa5c70467f7'
Cloning into 'src/raklib'...
remote: Counting objects: 577, done.
remote: Total 577 (delta 0), reused 0 (delta 0), pack-reused 577
Receiving objects: 100% (577/577), 141.29 KiB | 0 bytes/s, done.
Resolving deltas: 100% (432/432), done.
Checking connectivity... done.
Submodule path 'src/raklib': checked out '660bdff07d85c0270e57da2a5ce69eff2a87649a'
Cloning into 'src/spl'...
remote: Counting objects: 65, done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 65
Unpacking objects: 100% (65/65), done.
Checking connectivity... done.
Submodule path 'src/spl': checked out '178d2a38f95d552fa5d91da26edc13a86d8054c6'
Cloning into 'tests/testerplugin'...
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 8 (delta 2), reused 1 (delta 1), pack-reused 5
Unpacking objects: 100% (8/8), done.
Checking connectivity... done.
Submodule path 'tests/testerplugin': checked out '1a0dec97cc354a0b62b41c007caa6f84885b8263'
Starting for the first time¶
Now you should be able to start PocketMine-MP.
The first time it starts with a set-up wizard,
this can be disabled by running ./start.sh --no-wizard
.
$ ./start.sh
[*] PocketMine-MP set-up wizard
[*] Please select a language:
English => en
Español => es
䏿–‡ => zh
Pyccĸий => ru
日本語 => ja
Deutsch => de
한êµì–´ => ko
Nederlands => nl
Français => fr
Italiano => it
Melayu => ms
Norsk => no
Svenska => sv
Suomi => fi
Türkçe => tr
[?] Language (en):
PocketMine-MP supports a few other languages. Fill in the two letters behind the language and press enter. Is your language not in the list? Add it on Crowdin.
[*] English has been correctly selected.
Welcome to PocketMine-MP!
Before starting setting up your new server you have to accept the license.
PocketMine-MP is licensed under the LGPL License,
that you can read opening the LICENSE file on this folder.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
[?] Do you accept the License? (y/N):
Do you accept the License?
[?] Do you want to skip the set-up wizard? (y/N):
You can skip the wizard from here and start the server with the default settings or continue.
[*] You are going to set up your server now.
[*] If you don't want to change the default value, just press Enter.
[*] You can edit them later on the server.properties file.
[?] Give a name to your server (Minecraft: PE Server):
[*] Do not change the default port value if this is your first server.
[?] Server port (19132):
[*] The RAM is the maximum amount of memory PocketMine-MP will use. A value of 128-256 MB is recommended
[?] Server RAM in MB (256):
[*] Choose between Creative (1) or Survival (0)
[?] Default Game mode: (0):
[?] Max. online players (20):
[*] The spawn protection disallows placing/breaking blocks in the spawn zone except for OPs
[?] Enable spawn protection? (Y/n):
[*] An OP is the player admin of the server. OPs can run more commands than normal players
[?] OP player name (example, your game name):
[!] You will be able to add an OP user later using /op <player>
[*] The white-list only allows players in it to join.
[?] Do you want to enable the white-list? (y/N):
[!] Query is a protocol used by different tools to get information of your server and players logged in.
[!] If you disable it, you won't be able to use server lists.
[?] Do you want to disable Query? (y/N):
[*] RCON is a protocol to remote connect with the server console using a password.
[?] Do you want to enable RCON? (y/N):
[*] Getting your external IP and internal IP
[!] Your external IP is 87.212.35.149. You may have to port-forward to your internal IP 192.168.0.150
[!] Be sure to check it, if you have to forward and you skip that, no external players will be able to join. [Press Enter]
[*] You have finished the set-up wizard correctly
[*] Check the Plugin Repository to add new features, minigames, or advanced protection to your server
[*] PocketMine-MP will now start. Type /help to view the list of available commands.
[Server thread/INFO]: Loading pocketmine.yml...
[Server thread/INFO]: Loading server properties...
[Server thread/INFO]: Selected English (eng) as the base language
[Server thread/INFO]: Starting Minecraft: PE server version v0.11.0 alpha
[Server thread/NOTICE]: The memory-limit setting has been deprecated.
[Server thread/NOTICE]: There are new memory settings on pocketmine.yml to tune memory and events.
[Server thread/NOTICE]: You can also reduce the amount of threads and chunks loaded control the memory usage.
[Server thread/INFO]: Opening server on 0.0.0.0:19132
[Server thread/INFO]: This server is running PocketMine-MP version 1.5dev-1254 "活発(Kappatsu)フグ(Fugu)" (API 1.12.0)
[Server thread/INFO]: PocketMine-MP is distributed under the LGPL License
[Server thread/INFO]: Preparing level "world"
[Server thread/INFO]: Starting GS4 status listener
[Server thread/INFO]: Setting query port to 19132
[Server thread/INFO]: Query running on 0.0.0.0:19132
[Server thread/INFO]: Default game type: Survival Mode
[Server thread/INFO]: Done (19.485s)! For help, type "help" or "?"
The server should have started now and you should be able to join.
Configuration¶
Default configuration files¶
server.properties¶
More info about the properties can be found on the Minecraft wiki.
server-name=Minecraft: PE Server
server-port=19132
memory-limit=256M
gamemode=0
max-players=20
spawn-protection=16
white-list=off
enable-query=on
enable-rcon=off
motd=Minecraft: PE Server
announce-player-achievements=on
allow-flight=off
spawn-animals=on
spawn-mobs=on
force-gamemode=off
hardcore=off
pvp=on
difficulty=1
generator-settings=
level-name=world
level-seed=
level-type=DEFAULT
rcon.password=lT47ZUZs8L
auto-save=on
pocketmine.yml¶
# Main configuration file for PocketMine-MP
# These settings are the ones that cannot be included in server.properties
# Some of these settings are safe, others can break your server if modified incorrectly
# New settings/defaults won't appear automatically on this file when upgrading.
settings:
#Three-letter language code for server-side localization
#Check your language code on https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
language: "eng"
#Whether to send all strings translated to server locale or let the device handle them
force-language: false
shutdown-message: "Server closed"
#Allow listing plugins via Query
query-plugins: true
#Show a console message when a plugin uses deprecated API methods
deprecated-verbose: true
#Enable plugin and core profiling by default
enable-profiling: false
#Will only add results when tick measurement is below or equal to given value (default 20)
profile-report-trigger: 20
#Number of AsyncTask workers.
#Used for plugin asynchronous tasks, world generation, compression and web communication.
#Set this approximately to your number of cores.
#If set to auto, it'll try to detect the number of cores (or use 2)
async-workers: auto
memory:
#Global soft memory limit in megabytes. Set to 0 to disable
#This will trigger low-memory-triggers and fire an event to free memory when the usage goes over this
global-limit: 512
#Main thread soft memory limit in megabytes. Set to 0 to disable
#This will trigger low-memory-triggers and fire an event to free memory when the usage goes over this
main-limit: 320
#Period in ticks to check memory (default 1 second)
check-rate: 20
#Continue firing low-memory-triggers and event while on low memory
continuous-trigger: true
#Only if memory.continuous-trigger is enabled. Specifies the rate in memory.check-rate steps (default 30 seconds)
continuous-trigger-rate: 30
garbage-collection:
#Period in ticks to fire the garbage collector manually (default 30 minutes), set to 0 to disable
#This only affect the main thread. Other threads should fire their own collections
period: 36000
#Fire asynchronous tasks to collect garbage from workers
collect-async-worker: true
#Trigger on low memory
low-memory-trigger: true
max-chunks:
#Limit of chunks to load per player, overrides chunk-sending.max-chunks
trigger-limit: 96
#Do chunk garbage collection on trigger
trigger-chunk-collect: true
#Trigger on low memory
low-memory-trigger: true
world-caches:
disable-chunk-cache: true
low-memory-trigger: true
network:
#Threshold for batching packets, in bytes. Only these packets will be compressed
#Set to 0 to compress everything, -1 to disable.
batch-threshold: 256
#Compression level used when sending batched packets. Higher = more CPU, less bandwidth usage
compression-level: 7
#Use AsyncTasks for compression. Adds half/one tick delay, less CPU load on main thread
async-compression: false
#Experimental, only for Windows. Tries to use UPnP to automatically port forward
upnp-forwarding: false
debug:
#If > 1, it will show debug messages in the console
level: 1
#Enables /status, /gc
commands: false
level-settings:
#The default format that levels will use when created
default-format: mcregion
#If true, converts from a format that is not the default to the default format on load
#NOTE: This is currently not implemented
convert-format: false
#Automatically change levels tick rate to maintain 20 ticks per second
auto-tick-rate: true
auto-tick-rate-limit: 20
#Sets the base tick rate (1 = 20 ticks per second, 2 = 10 ticks per second, etc.)
base-tick-rate: 1
#Tick all players each tick even when other settings disallow this.
always-tick-players: false
chunk-sending:
#Amount of chunks sent to players per tick
per-tick: 4
#Amount of chunks sent around each player
max-chunks: 192
#Amount of chunks that need to be sent before spawning the player
spawn-threshold: 56
#Save a serialized copy of the chunk in memory for faster sending
#Useful in mostly-static worlds where lots of players join at the same time
cache-chunks: false
chunk-ticking:
#Max amount of chunks processed each tick
per-tick: 40
#Radius of chunks around a player to tick
tick-radius: 3
light-updates: false
clear-tick-list: true
chunk-generation:
#Max. amount of chunks in the waiting queue to be generated
queue-size: 8
#Max. amount of chunks in the waiting queue to be populated
population-queue-size: 8
ticks-per:
animal-spawns: 400
monster-spawns: 1
autosave: 6000
cache-cleanup: 900
spawn-limits:
monsters: 70
animals: 15
water-animals: 5
ambient: 15
auto-report:
#Send crash reports for processing
enabled: true
send-code: true
send-settings: true
send-phpinfo: false
host: crash.pocketmine.net
anonymous-statistics:
#Sends anonymous statistics for data aggregation, plugin usage tracking
enabled: true
host: stats.pocketmine.net
auto-updater:
enabled: true
on-update:
warn-console: true
warn-ops: true
#Can be development, beta or stable.
preferred-channel: beta
#If using a development version, it will suggest changing the channel
suggest-channels: true
host: www.pocketmine.net
aliases:
#Examples:
#showtheversion: version
#savestop: [save-all, stop]
worlds:
#These settings will override the generator set in server.properties and allows loading multiple levels
#Example:
#world:
# seed: 404
# generator: FLAT:2;7,59x1,3x3,2;1;decoration(treecount=80 grasscount=45)
Updating¶
Manually update¶
Update PHP binary¶
Download the PHP binary for your OS:
Update PocketMine-MP¶
- Download the .phar matching your MCPE version from here.
- Change the name to
PocketMine-MP.phar
- Place it in the server folder
- Start the server and make sure the versions match
Note
Don’t forget to rename the file to PocketMine-MP.phar
FAQ¶
Installation¶
Failed loading opcache.so php5¶
This will happen when the installer is not used or when PocketMine-MP was moved. This can be fixed with a single command.:
sed "s/^zend_extension=.*opcache.so/zend_extension=$(find $(pwd) -name opcache.so | sed 's/\//\\\//g')/g" bin/php5/bin/php.ini | tee bin/php5/bin/php.ini
or manually by editing the bin/php5/bin/php.ini
file.
- Find
opcache.so
in the bin directory. - Edit
bin/php5/bin/php.ini
and replace everything afterzend_extensions=
with the full path of opcache.so
Failed loading opcache.so php7¶
This will happen when the installer is not used or when PocketMine-MP was moved. This can be fixed with a single command.:
sed "s/^zend_extension=.*opcache.so/zend_extension=$(find $(pwd) -name opcache.so | sed 's/\//\\\//g')/g" bin/php7/bin/php.ini | tee bin/php7/bin/php.ini
or manually by editing the bin/php7/bin/php.ini
file.
- Find
opcache.so
in the bin directory. - Edit
bin/php7/bin/php.ini
and replace everything afterzend_extensions=
with the full path of opcache.so
Can’t install as user root¶
Warning
This script is running as root, this is discouraged. It is recommended to run it as a normal user as it doesn’t need further permissions.
We recommend you to install PocketMine-MP as a normal user, not as root. Create one if you don’t have one.
useradd -d /home/pocketmine -m pocketmine
passwd pocketmine
Can I install PocketMine-MP on Windows XP¶
PocketMine-MP can not be installed on Windows XP. Is it an old computer? Try Linux!
Connecting¶
Can’t connect to the server¶
Run the version
command to check the supported MCPE version or Supported MCPE Versions.
Example:
for Minecraft: PE v0.10.5 alpha protocol version 20
for Minecraft: PE v0.11.0 alpha (protocol version 27)
Opening server on 0.0.0.0:19132¶
0.0.0.0
means “all IPv4 addresses on the local machine”.
If a host has two ip addresses, 192.168.1.1
and 10.1.2.1
, and a server running on the host listens on 0.0.0.0
,
it will be reachable at both of those IPs.
How do I connect to a server¶



Fill in the server details and you should be ready to go!

Note
A local server should show up on the Play screen without adding the details.
Do I have to open ports¶
If you have a firewall setup then you need to allow access to UDP port 19132
.
Note
Do you want to use RCON then TCP port 19132
also needs to be open.
Can other users connect to my server¶
Users on the same network are able to join the server. If you want other people from outside your own network to be able to join then you need to port-forward.
Do I have to configure port forwarding¶
This is only needed when you want people from outside your network to connect. Check portforward.com or use Google to find the instructions. Use the brand and type of your router as keywords.
Note
- UDP port: 19132 for PocketMine-MP and Query
- TCP port: 19132 for RCON
RakLib Thread Blocked x.x.x.x for x seconds¶
Timeout | Reason |
---|---|
5 seconds | Error on a normal MCPE packet |
300 seconds | More then 5000 packets per tick from one address |
600 seconds | Errors on external packet (like Query or RCON) |
Can’t connect to localhost Win10 server with Minecraft Win10 Edition¶
Launch Window PowerShell as an administrator and run the following:
CheckNetIsolation LoopbackExempt -a -n="Microsoft.MinecraftUWP_8wekyb3d8bbwe"
Plugins¶
How do I install plugins¶
Download the .phar
file and move it to the plugins
folder.
Can I use .php files¶
Yes, but only when the DevTools plugin is installed and the plugin/PocketMine API versions are both the same. Take a look at the plugin example
For small test plugins there is a new way, check out this forum thread
Developers Information¶
Contributing Code¶
- Use the Pull Request system, your request will be checked and discussed.
- Create a single branch for that pull request
- Code using the syntax as in PocketMine-MP. See below for an example.
- The code must be clear and written in English, comments included.
Check the Contribution Guidelines on github for more information.
Thanks for contributing to PocketMine-MP!
Extending PocketMine-MP¶
PocketMine-MP has an API that you can use to add new things. For more information look at the plugins page.
How to use git¶
Clone PocketMine-MP¶
Get the clone URL from pmmp/pocketmine-mp
$ git clone --recursive https://github.com/pmmp/pocketmine-mp.git # clone the original repository into PocketMine-MP.git
$ cd pocketmine-mp.git # change directory to PocketMine-MP.git
How to make a pull request¶
Go to the pmmp/pocketmine-mp repository and hit the Fork button. You should now have a forked repo from pmmp/pocketmine-mp in your own repositories.

Get the clone URL from the fork and clone it into another directory:
$ git clone git clone <YOUR SSH/HTTPS clone URL> pocketmine-mp-fork.git # clone the original repository into PocketMine-MP-Fork.git
$ git checkout -b feature # create and switch to branch feature (it can be any name)
$ git branch # shows current branch
* feature # current branch
master
Make your changes to the code and commit it:
Note
Only commit changes described in the commit message
$ git status # check the status
$ git add <filename> # add all changed files
$ git commit -m 'description of changes' # make a commit with a message
$ git push origin feature # push to your branch
Take a look at GitHub and make a pull request. If the pull request is accepted and merged, you can pull the changes back into your fork.
Note
To pull from the original repository you need to add the upstream
$ git remote add upstream https://github.com/pmmp/pocketmine-mp.git
$ git checkout master # switch back to the master branch
$ git fetch upstream # download latest commits from the upstream
$ git merge upstream/master # merge changes from upstream/master into your master branch
Remove the branch you made with
$ git branch -d feature # remove the branch to keep it clean
Plugins¶
PocketMine is extendable!
Plugins are available on Poggit or you can make your own plugin.
Below is an skeleton with the minimal needed directories, files and content.
Note
To run plugins from source or create .phar files you need DevTools.
Basic plugin structure¶
Directories¶
Make sure your base structure looks like this
PocketMine-MP
└── plugins
└── Example
├── plugin.yml
└── src
└── Example
└── Example.php
5 directories, 2 files
plugin.yml¶
This file is required in a plugin. It contains the information used by PocketMine-MP to load this plugin. It’s in YAML format (you will use this format for plugin configurations). It has four required fields: name, version, api and main. Each one of these fields (and all the optional ones) are described on the plugin.yml page. Be sure that it is named exactly plugin.yml.
field | data |
---|---|
name | The name for your plugin |
main | The namespace and classname pointing to your main plugin class. It is case sensitive |
version | The version string of your plugin |
api | Minimal PocketMine-MP API version required for your plugin (current) |
name: Example
main: Example\Example
version: 1.0.0
api: 2.1.0
Example.php¶
Now, create the main class file, that will include the PluginBase Class that starts the plugin. You can name it whatever you want, but a common way to name it is like the plugin name or Main.
<?php
namespace Example;
use pocketmine\plugin\PluginBase;
class Example extends PluginBase{
public function onLoad(){
$this->getLogger()->info("onLoad() has been called!");
}
public function onEnable(){
$this->getLogger()->info("onEnable() has been called!");
}
public function onDisable(){
$this->getLogger()->info("onDisable() has been called!");
}
}
Create .phar files¶
The easiest way to release a plugin is in .phar format. To create a .phar you need DevTools.
- Start PocketMine-MP
- Make sure the plugin is loaded. Look for
Loading source plugin <plugin name>
- Run
makeplugin <plugin name>
The <plugin name>
should be the same as the name in plugin.yml.
# Output for the Example plugin
[Server thread/INFO]: Loading source plugin Example v1.0.0
[Server thread/INFO]: [Example] onLoad() has been called!
[Server thread/INFO]: Enabling Example v1.0.0
[Server thread/INFO]: [Example] onEnable() has been called!
makeplugin Example
[Server thread/INFO]: [DevTools] Adding plugin.yml
[Server thread/INFO]: [DevTools] Adding src/Example/Example.php
[Server thread/INFO]: Phar plugin Example v1.0.0 has been created on /Pocketmine-MP/dev/plugins/DevTools//Example_v1.0.0.phar
More examples¶
Commands¶
name: Example
main: Example\Example
version: 1.0.0
api: 1.12.0
commands:
example1:
description: "Example1 command"
usage: "/example1"
example2:
descroption "Example2 command with arguments"
usage: "/example2 <args>"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?php
namespace Example;
use pocketmine\plugin\PluginBase;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
class Example extends PluginBase{
public function onCommand(CommandSender $sender, Command $command, $label, array $args) {
switch($command->getName()) {
case "example1":
// do stuff
return true;
case "example2":
if (count($args) == 0 ){
return false;
}
var_dump($args); // do stuff
return true;
}
}
}
|
Resources¶
Issues¶
Check the following things and update if needed before making a new issue:
- PocketMine-MP version
- PHP binary version
- Plugin versions
When you have the latest version of those files, and the problem still occurs, making certain that a plugin is not the cause, then make a new issue on GitHub.
Give as much information as you can about when or what happened.
Warning
Did the server crash and generate a crash dump? Post the Crash ID in your issue report to help us diagnose the problem. If you do not have internet connection, you can paste the dump on Gist and post the link to it instead.

Contact and Support¶
- PocketMine Forums
- #pocketmine for support @ chat.freenode.net