By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.

OK, Don't show this again

Development tools plugin for PocketMine-MP
version 1.13.5
Direct Download How to install?
Switch version
3476 Downloads / 50559 Total
40 Reviews
Plugin Description §


Loading folder plugins

DevTools loads plugins in folder format in the plugins directory.

For example, if you have these structure:


DevTools will load MyPlugin like a normal plugin when the server starts.

Creating plugin phars

After a folder plugin is loaded with DevTools, DevTools can turn it into a phar file, with the command:

/makeplugin <plugin name>

where <plugin name> is the plugin name in its plugin.yml (not the folder name). The phar will be created in plugins/DevTools.

Extracting plugin phars

Plugins in phar format can be extracted using the extractplugin command:

/extractplugin <plugin name>

where <plugin name> is the plugin name (not the phar file name). The plugin will be extracted to a subfolder in plugins/DevTools.

Creating server phar

If the server runs from source (not from PocketMine-MP.phar), the command /makeserver will create the phar in the plugins/DevTools folder. Move it next to the start.cmd/ and rename it to PocketMine-MP.phar, and the server will run from the PocketMine-MP.phar instead of running from source.

Checking permissions

DevTools can check the details of a permission and whether a player has the permission.

/checkperm <node> [player name]
  • <node> is the name of the permission node to check.
  • [player name] is the name of the player to test permission for, or yourself (including console) if not provided.

Generating plugin

DevTools can initialize a basic plugin.

/genplugin <plugin name> <author name>

<plugin name> and <author name> must only contain alphabets, numbers and underscores.

A skeleton plugin structure will be generated in the plugins folder, so when you restart the server, the generated plugin will be loaded by DevTools.

Using ConsoleScript

You can use ConsoleScript to build a DevTools phar from source code. Contrary to popular assumption, this is very simple. Assuming you have a php executable in your PATH variable, cd into the DevTools directory (the folder where plugin.yml is located) and simply run the following:

php -dphar.readonly=0 path/to/ConsoleScript.php --make path/to/DevTools --relative path/to/DevTools --out path/to/put/devtools/phar/in/DevTools.phar

You can then load the phar onto a PocketMine-MP server. A correctly-built DevTools phar can also be executed directly from the command line as if it was the ConsoleScript.

Build phars from the command line

You can also use the ConsoleScript or a DevTools phar from the command-line to build PocketMine-MP phars or plugin phars.

The script currently takes the following arguments:

  • --make: The path to the files you want to bundle into a phar
  • --relative: (Optional) Relative path to use when building the phar. This usually isn't necessary for plugins. Used to build PocketMine-MP phars with the src directory without including the files in the repository root.
  • --entry: (Optional) PHP file within the phar to execute when running the phar from the command-line. Usually not needed for plugins, but required for a PocketMine-MP phar. Used to generate phar stubs.
  • --stub: (Optional) PHP file to use as a custom phar stub. The stub will be executed when the phar is run from the command line.
  • --out: Path and filename of the output phar file.

Example command line for building a plugin:

php -dphar.readonly=0 path/to/ConsoleScript.php --make path/to/your/plugin/sourcecode --out path/to/put/your/plugin.phar

Example command line for building PocketMine

php -dphar.readonly=0 path/to/ConsoleScript.php --make path/to/PocketMine-MP/src --relative path/to/PocketMine-MP --entry src/pocketmine/PocketMine.php --out path/to/put/your/PocketMine-MP.phar
What's new §

/genplugin now generates a true skeleton plugin without extra useless junk.

Fixed --make paths matching prefix instead of full folder name

  • Don't try to build phars if phar.readonly is set, closes #39
  • Remove deprecated method usage, require PM 3.4.0+
  • Fixed crash in /makeplugin when the source files for a folder plugin were deleted from disk at runtime

This release is compatible with PocketMine-MP 3.0.0 and all later minor/patch releases.

  • Fixed file (non directory) paths not working as --make arguments for ConsoleScript
  • Cleaned up genplugin command - now it doesn't write useless files to disk
  • Fixed ConsoleScript ignoring compression type
  • Fixed some duplicated directory separators
  • Fixed projects not being buildable if they were contained in a hidden directory or otherwise excluded build path.
  • Now uses strict types and typehints throughout.
  • Updated for PocketMine-MP PluginLoader rewrite.
  • Reduced duplication of code between DevTools main and ConsoleScript (now more dependent on ConsoleScript).
  • DevTools 1.12.10, ALPHA12 compatibility
  • Fixed typo in FilesystemIterator
  • Fixed phar building issues on Windows paths (backslashes) (#29)
  • Fixed building with symlinked files with ConsoleScript (#25)
  • Added FolderPluginLoader->canLoadPlugin() to comply with API changes in PocketMine-MP
  • Fixed EOF newlines

support for API version 3.0.0-ALPHA11 release

  • Fixed entry path resolution when relative paths are used in --entry
  • Fixed undefined variable in generated plugin phar stubs
  • DevTools will no longer crash when folder plugins have invalid data directories or have no main class to be found
  • Bump for API 3.0.0-ALPHA10
  • Added /makeplugin * to allow building all folder plugins on the server (#19)
  • Fixed /genplugin crash and cleaned up
  • Updated for ALPHA9
  • Fixed RCE vulnerability in /genplugin (Missing return after regex check on name and author - thanks GH Freax13)
  • /genplugin now automatically sanitizes plugin names and authors which have illegal characters in them
  • bump for ALPHA8
  • Use Phar::buildFromDirectory(), significantly faster for large builds (such as server!), significantly improved performance of /makeserver, /makeplugin and ConsoleScript
  • /makeserver can now only be used on servers running from source code
  • /makeserver and /makeplugin no longer produce spammy output for adding files

(Revision 2)

  • Fixed a stupid Friday-evening bug in the previous revision
  • ALPHA7 support, removed support for older versions
  • Fix bad command permission in generated plugins
Initial version
  • Support for API 3.0.0-ALPHA5, backwards-compatible

Minor bug fixes, please see GitHub Releases for changelogs.

using v1.14.1
20 Aug 20
This new update is better, Thanks!
using v1.14.1
20 Aug 20
using v1.14.0
18 Aug 20
using v1.14.0
30 Jul 20
``` hello @everyone
using v1.14.0
26 Jul 20
using v1.14.0
04 Jul 20
I’m trying to use this for making my own plugin using /genplugin but when I finish the plugin do I have to make it a .phar because it doesn’t work. If I don’t is it just because the script is wrong?
using v1.14.0
14 Jun 20
Every plugin developer should have this plugin
using v1.14.0
19 May 20
using v1.14.0
07 Apr 20
Just send me a error Server thread/CRITICAL ParseError: "syntax error, unexpected 'private' (T_PRIVATE)" (EXCEPTION) in "plugins/Test/src/Test/Main" at line 29 07.04 08:22:54 [Server] Server thread/DEBUG #0 vendor/pocketmine/classloader/src/BaseClassLoader
using v1.14.0
06 Mar 20
using v1.14.0
02 Mar 20
If you're not using this, then my friend you shouldn't be running PM server.
using v1.14.0
06 Feb 20
how do i use it?
using v1.14.0
06 Feb 20
Nice plugin!
using v1.13.5
06 Apr 20
Cannot use it for building server
using v1.13.5
10 Jan 20
using v1.13.5
01 Dec 19
using v1.13.5
28 Oct 19
thank you for improving /genplugin
using v1.13.4
30 Sep 19
using v1.13.4
08 Sep 19
very useful :D
using v1.13.4
28 Aug 19
using v1.13.4
22 Jun 19
using v1.13.3
01 Jun 19
The best
using v1.13.3
24 May 19
using v1.13.3
01 May 19
using v1.13.3
08 Mar 19
Can't count how many times this plugin has been useful for me.
using v1.13.3
07 Feb 19
The most essential plugin for Development. So useful
using v1.13.0
27 Feb 19
using v1.13.0
02 Dec 18
using v1.13.0
26 Jul 18
Please update to 4.0.0 :)
using v1.13.0
30 Jun 18
using v1.13.0
22 Jun 18
using v1.12.10
10 Jun 18
using v1.12.10
07 Jun 18
Hello! Did it has the tutorials ?
using v1.12.10
20 May 18
using v1.12.10
20 Apr 18
using v1.12.9
30 Mar 18
The most useful developer plugin of all time.
using v1.12.8
05 Jan 18
nice work
using v1.12.7
22 Nov 17
using v1.12.1
22 Nov 20
using v1.12.1
18 Jun 20

Reply to review by :

Supported API versions
Producers §
  • Collaborators:
    • @dktapps
    • @shoghicp
  • Contributors:
    • @Awzaw
    • @Freax13
    • @Intyre
    • @PEMapModder
    • @SOF3
    • @robske110
License §
Developer Tools
Other files

You can leave one review per plugin release, and delete or update your review at any time