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
DevTools is a collection of utilities used for developing PocketMine-MP plugins.
/genplugin <pluginName> <authorName>
: Generates skeleton files for a new plugin/extractplugin <pluginName>
: Extracts the source of a loaded plugin from its Phar file/makeplugin <pluginName>
: Creates a Phar plugin archive for its distribution/makeplugin *
: Creates Phar plugin archives for all loaded plugins/checkperm <node> [playerName]
: Checks a permission node/listperms [playerName]
: Lists permissions assigned to the command sender, or the target player/handlers [partialEventName]
: Lists event handlers registered to event classes matching the input/handlersbyplugin <pluginName>
: Lists event handlers registered by the given pluginContrary to popular belief, 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.
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:
argument | required | description |
---|---|---|
--make |
yes | The comma-separated path(s) to the files you want to bundle into a phar |
--relative |
no | Make DevTools resolve paths relative to the given path. If not specified, defaults to the current working directory. |
--stub |
no | PHP file to use as a custom phar stub. The stub will be executed when the phar is run from the command line. |
--out |
yes | 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
/checkperm
, /extractplugin
and /genplugin
related to PM5 Translatable
changes/handlers [partialEventName]
: lists all event handlers registered to event classes matching the input string, or all events if no arguments are given/handlersbyplugin <pluginName>
: lists all event handlers registered by a given plugin/listperms
command, which allows you to see all of the permissions a user has been granted or denied./genplugin
now generates plugins in PSR-4 structure using src-namespace-prefix
(new feature in 4.0.0)./makeplugin
no longer supports building FolderPluginLoader
as a separate plugin (this was anyway broken for a long time and nobody complained, so clearly nobody cares that much)ConsoleScript
now allows including single files by passing them via --makesrc-namespace-prefix
to get rid of useless subdirectories in src
.ConsoleScript and /makeplugin now generate a phar stub that doesn't depend on the phar extension.
/genplugin
crash on PHP 7.4./makeserver
. This command is now redundant with the introduction of a specialized build script in PocketMine-MP itself./genplugin now generates a true skeleton plugin without extra useless junk.
Fixed --make paths matching prefix instead of full folder name
/makeplugin
when the source files for a folder plugin were deleted from disk at runtimeThis release is compatible with PocketMine-MP 3.0.0 and all later minor/patch releases.
--make
arguments for ConsoleScript
genplugin
command - now it doesn't write useless files to diskConsoleScript
ignoring compression typesupport for API version 3.0.0-ALPHA11 release
--entry
(Revision 2)
Minor bug fixes, please see GitHub Releases for changelogs.
Reply to review by :
You can leave one review per plugin release, and delete or update your review at any time