Skip to content

A PhpStorm project designed for developing PocketMine-MP plugins.

Notifications You must be signed in to change notification settings

BreathTakinglyBinary/PocketDev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PocketMine-MP Development Environment

This is a PhpStorm project that will work as a development environment for working with PocketMine-MP plugins.

Prerequisites

For this project to work correctly, you must have a compatible PHP binary on you computer and PhpStorm setup to properly use it.

  • Download a PHP binary for your OS from https://jenkins.pmmp.io/job/PHP-7.3-Aggregate/
  • Extract the files to a location on your computer (e.g. C:\php\php7.3)
  • Go to PhpStorm's settings for Language and Frameworks, then choose the PHP section
  • Update "PHP language level" to 7.3
  • Click the triple dot button next the "CLI Interpreter". This will open a new window
  • In the "CLI Interpreter" window, change the name to something like PHP PocketMine
  • Click the folder icon in the "PHP executable" option.
  • Locate your php executable file (e.g C:\php\php7.3\php.exe)
  • Click "Apply" then "OK" in the "CLI Interpreter" window
  • Click the "PHP Runtime" tab just below the "CLI Interpreter" box
  • Click the button at the bottom that says "Sync Extensions with Interpreter"
  • Click "Apply" then "OK" in the "Settings" window

You are now ready to use this project.

First Use

This project comes with several pre-built Run Configurations. The first one that should be used is "Setup Environment". It will create the necessary folders for use with the other runtime configurations and setup a copy of PocketMine-MP for library and test purposes.

Once you've used the "Setup Environment" run configuration, you can start adding plugin source code folders to the "plugins" folder that was created.

After Setup

After running "Setup Environment" a "plugins" folder and "server" folder will be in the project folder. These folder contain the various parts and pieces that will be used for developing and testing your plugins.

Plugins Folder

You can put the source code of your plugins in sub-directories of the "plugins" folder. It is important that the subdirectory contain the plugin.yml file and src folder of your plugin. An example of what this needs to look like will have been created during the setup.


Server Folder

The server folder contains a PocketMine-MP server environment. Most of the server settings files will be generated the first time you use the "Run Server" or "Run Server (All Plugins)" options.


Making New Plugins

You can start a new plugin by using the "Generate Plugin Skeleton" run configuration. This will prompt you for the plugin name and the author's name, then generate the necessary files to start a plugin.


Updating PocketMine-MP

Occasionally, you may need to update the version of PocketMine-MP your test environment is using. The easiest way to do this is to use the "Update PocketMine-MP" run configuration. This will remove the current PocketMine-MP server file and replace it with whatever the most current, stable version is on GitHub. Optionally, you can manually update the file by downloading a replacement from GitHub Releases.


DeVirion

The test environment will include a plugin to help you test called DeVirion. This plugin loads special libraries that some plugins may need. If you need details on how to use it, you can get that from its page on Poggit. It can be updated as needed using the "Update DeVirion" run configuration.

About

A PhpStorm project designed for developing PocketMine-MP plugins.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages