DevTools for PocketMine-MP: From Plugin Folder to PHAR

Build a working PocketMine command, package it with DevTools 1.17.2, then verify the PHAR on a clean server without DevTools.

Content language

DevTools turns an editable PocketMine plugin folder into a PHAR you can move to another server. Build the small ModonixWorkshop command below, package it, then check its reply inside Minecraft. Keeping that first command simple makes the path from source code to a working plugin easy to follow.

Install DevTools on a compatible PocketMine server. The commands below run in the server console, without a leading slash; use /workshop for the final in-game check.

The installed ModonixWorkshop PHAR replies in Bedrock 26.52 beside our wooden lobby pier.

The installed example PHAR replies “ModonixWorkshop 0.0.1 is ready.” The pier is our demonstration build, not a map supplied with DevTools.

Start with the matching server and DevTools file

For this example, start Axolotl-PM 5.49.1 in a separate development folder with PHP 8.3.29 ZTS and the server’s required extensions. Keep your regular server separate while learning the build steps. A Minecraft client is only needed when you want to try the command in game.

Stop that server, place DevTools 1.17.2 in its plugins folder as DevTools.phar, then start it again. Enter:

plugins
genplugin ModonixWorkshop Modonix

The first command lists loaded plugins. The second creates plugins/ModonixWorkshop/plugin.yml and plugins/ModonixWorkshop/src/Main.php. Use these names in the example code below: the author name also becomes part of the PHP namespace.

Creating the folder does not immediately load the new plugin. Stop the server before editing these files, then restart it after the changes.

Give the example one command you can test

Replace plugins/ModonixWorkshop/plugin.yml with:

name: ModonixWorkshop
version: 0.0.1
main: Modonix\ModonixWorkshop\Main
api: 5.44.3
src-namespace-prefix: Modonix\ModonixWorkshop
commands:
  workshop:
    description: Check the workshop plugin
    permission: modonixworkshop.command.workshop
permissions:
  modonixworkshop.command.workshop:
    default: op

The sample above retains API 5.44.3 as its minimum from the original walkthrough. A freshly generated file may name the running server’s API instead; the value shown here is the sample’s declaration. DevTools itself declares minimum API 5.0.0. Changing either number does not update plugin code for an older API.

Replace plugins/ModonixWorkshop/src/Main.php with:

<?php
declare(strict_types=1);

namespace Modonix\ModonixWorkshop;

use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\plugin\PluginBase;

class Main extends PluginBase{
    public function onCommand(CommandSender $sender, Command $command, string $label, array $args): bool{
        if($command->getName() !== "workshop"){
            return false;
        }
        $sender->sendMessage("ModonixWorkshop 0.0.1 is ready.");
        return true;
    }
}

Restart the server. DevTools enables folder-plugin loading, so plugins lists both DevTools and ModonixWorkshop. Run workshop; the command replies ModonixWorkshop 0.0.1 is ready. This provides a simple result to check before packaging.

The command permission defaults to operators. Use an operator account for the first in-game /workshop check. If ordinary players need the command later, grant its modonixworkshop.command.workshop permission deliberately instead of making everyone an operator.

Build the PHAR from the loaded folder

With ModonixWorkshop loaded, enter:

makeplugin ModonixWorkshop

DevTools writes the archive under plugin_data/DevTools/ModonixWorkshop_v0.0.1.phar. Keep the ModonixWorkshop source folder as your editable project. The PHAR is the copy to install on the other server.

If makeplugin reports an invalid plugin name, run plugins and check that ModonixWorkshop loaded after restart. For a load error, fix the first relevant console error before packaging. If PHP reports that PHAR creation is disabled, set phar.readonly=0 in the development server’s PHP configuration and restart it.

Install the package on a separate server

To move the plugin to another installation, prepare a separate server with the same server and PHP setup. While it is stopped, copy the archive into its plugins directory; ModonixWorkshop.phar is a convenient filename. The plugin name still comes from plugin.yml inside the archive.

Keep DevTools and the editable source folder in the first server. Start the second server and run:

plugins
workshop

The second server should load ModonixWorkshop and the command should return ModonixWorkshop 0.0.1 is ready. Keep the folder and PHAR on separate servers so the same plugin is not loaded twice. You can also check the packaged version on your development server: stop it, move the source folder out of its active plugins directory, install the PHAR and restart. That is the packaged version shown in the Minecraft image above.

Keep the client and server compatible

Choose the server API listed for the selected file in Files. Match a connecting Bedrock client to the server’s game protocol separately from the plugin’s minimum API.

The upstream PocketMine-MP and DevTools repositories are archived. Use the supported setup listed with the file when studying or maintaining this server; a newer client cannot connect to every older server protocol.

No ratings yet

Files

Filter files Files: 3All release types
Show all files

Version 1.17.2

Stable

DevTools.phar

Server software: PocketMine-MP
1 download
Download · 43.7 KB
Requirements & details
  • Server software: PocketMine-MP · Server API version: 5.0.0

Stop the development server, place DevTools.phar in plugins, then restart. DevTools 1.17.2 declares minimum PocketMine API 5.0.0. Restart after generating or editing a source plugin before running makeplugin. Keep its editable folder and built PHAR in separate active plugin directories. The server-console build steps do not require a Minecraft client.

Requirements & notes
Known issues
Loading a source folder and its PHAR together can cause duplicate-plugin errors. Restart after editing source files. PocketMine-MP 5.44.3 targets Bedrock 26.30; match player clients to the server protocol. The example plugin requires API 5.44.3.
Server runtime requirements
The original PHAR-building walkthrough used PocketMine-MP 5.44.3 with PHP 8.3.29 ZTS on Windows; that server targets Bedrock 26.30. The additional in-game /workshop example uses DevTools 1.17.2 on Axolotl-PM 5.49.1 with PHP 8.3.29 ZTS and Bedrock 26.52 on Windows. DevTools still declares minimum API 5.0.0; the example does not establish support for other server or client versions.

Version 1.17.0

Stable

DevTools.phar

Server software: PocketMine-MP
0 downloads
Download · 43.4 KB
Requirements & details
  • Server software: PocketMine-MP · Server API version: 5.0.0
Requirements & notes
Server runtime requirements
A compatible PocketMine-MP server and its supported PHP runtime.

Version 1.16.0

Stable

DevTools.phar

Server software: PocketMine-MP
0 downloads
Download · 36.4 KB
Requirements & details
  • Server software: PocketMine-MP · Server API version: 4.0.0
Requirements & notes
Server runtime requirements
A compatible PocketMine-MP server and its supported PHP runtime.

Release updates

Version 1.17.2

Stable

Upstream release date: 2025-02-01.

Exact corresponding source: DevTools 1.17.2 source

Source: DevTools 1.17.2 release notes
Compatibility details below reflect targets declared by the author. See the linked source for complete version and device information.

View files

Version 1.17.0

Stable

Upstream release date: 2023-06-01.

Exact corresponding source: DevTools 1.17.0 source

Source: DevTools 1.17.0 release notes
Compatibility details below reflect targets declared by the author. See the linked source for complete version and device information.

View files

Version 1.16.0

Stable

Upstream release date: 2022-09-24.

Exact corresponding source: DevTools 1.16.0 source

Source: DevTools 1.16.0 release notes
Compatibility details below reflect targets declared by the author. See the linked source for complete version and device information.

View files

Comments 0

Share what worked, ask for help or reply to another player.

Join the conversation

1Your name & email

No account required. Confirm your email with a code before your first comment. Only a masked address appears with your name. Guest comments are reviewed before publication.

2Verify & post

No comments yet. Share what worked for you.

Search Modonix

Search in