PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages

PocketMine-MP Contribution Guidelines

You must follow these guidelines if you wish to contribute to the PocketMine-MP code base, or participate in issue tracking.

I have a question

  • For questions, please refer to the _::pocketmine_ or _::mcpedevs_ IRC channel on Freenode. There is a WebIRC if you want.
  • You can ask directly to __ in Twitter, but don't expect an immediate reply.
  • You may use our Forum to ask questions.
  • We do not accept questions or support requests in our issue tracker.

Creating an Issue

  • First, use the Issue Search to check if anyone has reported it.
  • If your issue is related to a plugin, you must contact their original author instead of reporting it here.
  • If your issue is related to a PocketMine official plugin, or our Android application, you must create an issue on that specific repository.
  • Support requests are not bugs. Issues such as "How do I do this" are not bugs and are closed as soon as a collaborator spots it. They are referred to our Forum to seek assistance.
  • No generic titles such as "Question", "Help", "Crash Report" etc. If an issue has a generic title they will either be closed on the spot, or a collaborator will edit it to describe the actual symptom.
  • Information must be provided in the issue body, not in the title. No tags are allowed in the title, and do not change the title if the issue has been solved.
  • Similarly, no generic issue reports. It is the issue submitter's responsibility to provide us an issue that is trackable, debuggable, reproducible, reported professionally and is an actual bug. If you do not provide us with a summary or instructions on how to reproduce the issue, it is a support request until the actual bug has been found and therefore the issue is closed.

Contributing Code

  • Use the Pull Request system, your request will be checked and discussed.
  • Create a single branch for that pull request
  • Code using the syntax as in PocketMine-MP. See below for an example.
  • The code must be clear and written in English, comments included.
  • Use descriptive commit titles
  • No merge commits are allowed, or multiple features per pull request

Thanks for contributing to PocketMine-MP!

Code Syntax

It is mainly https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md "PSR-2" with a few exceptions.

  • Opening braces MUST go on the same line, and MUST NOT have spaces before.
  • else if MUST be written as elseif. _(It is in PSR-2, but using a SHOULD)_
  • Control structure keywords or opening braces MUST NOT have one space after them.
  • Code MUST use tabs for indenting.
  • Long arrays MAY be split across multiple lines, where each subsequent line is indented once.
  • Files MUST use only the <?php tag.
  • Files MUST NOT have an ending ?> tag.
  • Code MUST use namespaces.
  • Strings SHOULD use the double quote " except when the single quote is required.
  • Argument lists MAY NOT be split across multiple lines, except long arrays.

```php <?php

namespace pocketmine