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.16.1
Approved
Direct Download How to install?
Switch version
3127 Downloads / 100589 Total
56 Reviews
Plugin Description §

Development Tools for PocketMine-MP

DevTools is a collection of utilities used for developing PocketMine-MP plugins.

Features

  • Generate skeleton files to bootstrap a new plugin
  • Build plugin phars from source code
  • Load plugins directly from source code (folder plugins), useful for rapid development
  • Check player permissions using commands

Commands

  • /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 plugin

Using ConsoleScript to build a DevTools phar from source code

Contrary 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.

Build plugin 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:

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
What's new §
  • Fixed deprecation error on PHP 8.2
  • New command /handlers [partialEventName]: lists all event handlers registered to event classes matching the input string, or all events if no arguments are given
  • New command /handlersbyplugin <pluginName>: lists all event handlers registered by a given plugin
  • Support for PocketMine-MP 4.0.0
  • Added /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 --make
  • Now uses src-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.

  • PocketMine-MP 3.13.0 is now required as a minimum.
  • Code is now analysed using PHPStan on level 6.
  • Fixed /genplugin crash on PHP 7.4.
  • Removed /makeserver. This command is now redundant with the introduction of a specialized build script in PocketMine-MP itself.
  • Cleaned up README: now provides more useful information.

/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.


HBIDamian
Outdated
using v1.17.0
04 Jun 23
How does a penguin build its house? Igloos it together! Why don't skeletons fight each other? They don't have the guts!
note3crafter
Outdated
using v1.17.0
04 Jun 23
Great
HBIDamian
Outdated
using v1.15.0
28 Jul 22
Did you ever hear the tragedy of DevTools the useful? I thought not. It’s not a story Dktapps would tell you. It's a PocketMine legend.
Ihsan48
Outdated
using v1.15.0
28 Jul 22
Maelus-999
Outdated
using v1.15.0
24 Jul 22
Please Update To new version :'(
DaDevGuy
Outdated
using v1.15.0
07 May 22
JustJoostNL
Outdated
using v1.15.0
14 Apr 22
NTT1906
Outdated
using v1.15.0
08 Jan 22
GuidedApex
Outdated
using v1.15.0
04 Jan 22
pog plugin :D
ZZWILLIAMXXTrue
Outdated
using v1.15.0
09 Dec 21
DidntPot
Outdated
using v1.14.2
07 Sep 21
yes.
Mcbeany
Outdated
using v1.14.2
07 Sep 21
JkGamer12
Outdated
using v1.14.2
07 Sep 21
The plugin is very usefull but not working in pocketmine server now when I type /makeplugin and my plugin name it shows just message but doesn't executes command. Pls fix it
Vecnavium
Outdated
using v1.14.2
29 May 21
Amazing, useful and easy to use
brokiem
Outdated
using v1.14.2
05 Apr 21
gud.
Endermanbugzjfc
Outdated
using v1.14.2
25 Feb 21
YeetYoshi
Outdated
using v1.14.2
18 Dec 20
pog chaaaaaamp
Altamash347
Outdated
using v1.14.1
20 Aug 20
This new update is better, Thanks!
ItzFabb-uwu
Outdated
using v1.14.1
20 Aug 20
poohhhygtv
Outdated
using v1.14.0
18 Aug 20
DimBis
Outdated
using v1.14.0
30 Jul 20
``` hello @everyone
jsonfromstatefarm
Outdated
using v1.14.0
26 Jul 20
radledazzler13
Outdated
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?
mmm545
Outdated
using v1.14.0
14 Jun 20
Every plugin developer should have this plugin
HyperFlareMC
Outdated
using v1.14.0
19 May 20
UnEnanoMas
Outdated
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
Invy55
Outdated
using v1.14.0
06 Mar 20
BobbyTowers
Outdated
using v1.14.0
02 Mar 20
If you're not using this, then my friend you shouldn't be running PM server.
Itzdvbravo
Outdated
using v1.14.0
06 Feb 20
how do i use it?
IceCruelStuff
Outdated
using v1.14.0
06 Feb 20
Nice plugin!
GamakCZ
Outdated
using v1.13.5
06 Apr 20
Cannot use it for building server
ItzLighting9332
Outdated
using v1.13.5
10 Jan 20
Gg
padreon
Outdated
using v1.13.5
01 Dec 19
AndreasHGK
Outdated
using v1.13.5
28 Oct 19
thank you for improving /genplugin
RetchroVinox
Outdated
using v1.13.4
30 Sep 19
Minecraftfan714
Outdated
using v1.13.4
08 Sep 19
very useful :D
szerookii
Outdated
using v1.13.4
28 Aug 19
Steellgold
Outdated
using v1.13.4
22 Jun 19
<3
JustJ0rd4n
Outdated
using v1.13.3
01 Jun 19
The best
DarksidexYT
Outdated
using v1.13.3
24 May 19
AlexPads
Outdated
using v1.13.3
01 May 19
LITERALLY THE BEST
CryptoKey98
Outdated
using v1.13.3
08 Mar 19
Can't count how many times this plugin has been useful for me.
Zedstar16
Outdated
using v1.13.3
07 Feb 19
The most essential plugin for Development. So useful
Ifera
Staff Outdated
using v1.13.0
02 Dec 18
Mundschutziii
Outdated
using v1.13.0
26 Jul 18
Please update to 4.0.0 :)
MangoTheDev
Outdated
using v1.13.0
30 Jun 18
useful.
Palente
Outdated
using v1.13.0
22 Jun 18
JaxkDev
Staff Outdated
using v1.12.10
10 Jun 18
SIVANNKHOld
Outdated
using v1.12.10
07 Jun 18
Hello! Did it has the tutorials ?
Thunder33345
Staff Outdated
using v1.12.10
20 May 18

Reply to review by :

/ 5
Supported API versions
4.0.0
->
4.21.1
Producers §
  • Collaborators:
    • @dktapps
  • Contributors:
    • @Awzaw
    • @Freax13
    • @Intyre
    • @PEMapModder
    • @SOF3
    • @TheNewHEROBRINEX
    • @robske110
    • @shoghicp
License §

Custom license

View
                   GNU LESSER GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.


  This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

  0. Additional Definitions.

  As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

  "The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

  An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

  A "Combined Work" is a work produced by combining or linking an
Application with the Library.  The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

  The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

  The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

  1. Exception to Section 3 of the GNU GPL.

  You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

  2. Conveying Modified Versions.

  If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

   a) under this License, provided that you make a good faith effort to
   ensure that, in the event an Application does not supply the
   function or data, the facility still operates, and performs
   whatever part of its purpose remains meaningful, or

   b) under the GNU GPL, with none of the additional permissions of
   this License applicable to that copy.

  3. Object Code Incorporating Material from Library Header Files.

  The object code form of an Application may incorporate material from
a header file that is part of the Library.  You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

   a) Give prominent notice with each copy of the object code that the
   Library is used in it and that the Library and its use are
   covered by this License.

   b) Accompany the object code with a copy of the GNU GPL and this license
   document.

  4. Combined Works.

  You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

   a) Give prominent notice with each copy of the Combined Work that
   the Library is used in it and that the Library and its use are
   covered by this License.

   b) Accompany the Combined Work with a copy of the GNU GPL and this license
   document.

   c) For a Combined Work that displays copyright notices during
   execution, include the copyright notice for the Library among
   these notices, as well as a reference directing the user to the
   copies of the GNU GPL and this license document.

   d) Do one of the following:

       0) Convey the Minimal Corresponding Source under the terms of this
       License, and the Corresponding Application Code in a form
       suitable for, and under terms that permit, the user to
       recombine or relink the Application with a modified version of
       the Linked Version to produce a modified Combined Work, in the
       manner specified by section 6 of the GNU GPL for conveying
       Corresponding Source.

       1) Use a suitable shared library mechanism for linking with the
       Library.  A suitable mechanism is one that (a) uses at run time
       a copy of the Library already present on the user's computer
       system, and (b) will operate properly with a modified version
       of the Library that is interface-compatible with the Linked
       Version.

   e) Provide Installation Information, but only if you would otherwise
   be required to provide such information under section 6 of the
   GNU GPL, and only to the extent that such information is
   necessary to install and execute a modified version of the
   Combined Work produced by recombining or relinking the
   Application with a modified version of the Linked Version. (If
   you use option 4d0, the Installation Information must accompany
   the Minimal Corresponding Source and Corresponding Application
   Code. If you use option 4d1, you must provide the Installation
   Information in the manner specified by section 6 of the GNU GPL
   for conveying Corresponding Source.)

  5. Combined Libraries.

  You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

   a) Accompany the combined library with a copy of the same work based
   on the Library, uncombined with any other library facilities,
   conveyed under the terms of this License.

   b) Give prominent notice with the combined library that part of it
   is a work based on the Library, and explaining where to find the
   accompanying uncombined form of the same work.

  6. Revised Versions of the GNU Lesser General Public License.

  The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

  Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

  If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Categories:
Developer Tools
Keywords
Permissions
Other files
Permissions
Commands

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

/ 5
Loading...