| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7c3c49d commit ce76d4e
934 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + # http://editorconfig.org/ | ||
| 2 | + root = yes | ||
| 3 | + | ||
| 4 | + [*] | ||
| 5 | + indent_size = 4 | ||
| 6 | + indent_style = tab | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,28 @@ | |||
| 1 | + # Auto detect text files and perform LF normalization | ||
| 2 | + * text=auto | ||
| 3 | + *.php text eol=lf | ||
| 4 | + *.sh text eol=lf | ||
| 5 | + *.txt text eol=lf | ||
| 6 | + *.properties text eol=lf | ||
| 7 | + *.bat text eol=crlf | ||
| 8 | + *.cmd text eol=crlf | ||
| 9 | + | ||
| 10 | + # Custom for Visual Studio | ||
| 11 | + *.cs diff=csharp | ||
| 12 | + *.sln merge=union | ||
| 13 | + *.csproj merge=union | ||
| 14 | + *.vbproj merge=union | ||
| 15 | + *.fsproj merge=union | ||
| 16 | + *.dbproj merge=union | ||
| 17 | + | ||
| 18 | + # Standard to msysgit | ||
| 19 | + *.doc diff=astextplain | ||
| 20 | + *.DOC diff=astextplain | ||
| 21 | + *.docx diff=astextplain | ||
| 22 | + *.DOCX diff=astextplain | ||
| 23 | + *.dot diff=astextplain | ||
| 24 | + *.DOT diff=astextplain | ||
| 25 | + *.pdf diff=astextplain | ||
| 26 | + *.PDF diff=astextplain | ||
| 27 | + *.rtf diff=astextplain | ||
| 28 | + *.RTF diff=astextplain | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,41 @@ | |||
| 1 | + ### Issue description | ||
| 2 | + <!--- use our forum https://forums.pmmp.io for questions --> | ||
| 3 | + <!--- Any issues requesting updates to new versions of MCPE will be treated as spam. We do not need issues to tell us that there is a new version available. --> | ||
| 4 | + <!--- | ||
| 5 | + Write a short description about the issue | ||
| 6 | + | ||
| 7 | + If you are reporting a regression or unexpected behaviour, please include the below information: | ||
| 8 | + Expected result: What were you expecting to happen? | ||
| 9 | + Actual result: What actually happened? | ||
| 10 | + --> | ||
| 11 | + | ||
| 12 | + ### Steps to reproduce the issue | ||
| 13 | + <!--- help us find the problem by adding steps to reproduce the issue --> | ||
| 14 | + 1. ... | ||
| 15 | + 2. ... | ||
| 16 | + | ||
| 17 | + ### OS and versions | ||
| 18 | + <!--- use the 'version' command in PocketMine-MP | ||
| 19 | + | ||
| 20 | + NOTE: LATEST is not a valid version. PocketMine version should include Jenkins build number and/or git commit hash. | ||
| 21 | + | ||
| 22 | + NO support whatsoever will be provided for forks or spoons of PocketMine. Issues relating to non-official distributions will be closed as spam. Please send such issues to whoever is responsible for the fork or spoon you are using. | ||
| 23 | + | ||
| 24 | + Note that 32-bit platforms are no longer supported by PocketMine-MP and issues concerning 32-bit platforms will be closed. | ||
| 25 | + --> | ||
| 26 | + * PocketMine-MP: | ||
| 27 | + * PHP: | ||
| 28 | + * Server OS: | ||
| 29 | + * Game version: PE/Win10 (delete as appropriate) | ||
| 30 | + | ||
| 31 | + ### Plugins | ||
| 32 | + - Test on a clean server without plugins: is the issue reproducible without any plugins loaded? | ||
| 33 | + | ||
| 34 | + If the issue is **not** reproducible without plugins: | ||
| 35 | + - Have you asked for help on our forums before creating an issue? | ||
| 36 | + - Can you provide sample, *minimal* reproducing code for the issue? If so, paste it in the bottom section | ||
| 37 | + - Paste your list of plugins here (use the 'plugins' command in PocketMine-MP) | ||
| 38 | + | ||
| 39 | + ### Crashdump, backtrace or other files | ||
| 40 | + <!--- please use gist or anything else and add links here --> | ||
| 41 | + * ... | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,36 @@ | |||
| 1 | + ## Introduction | ||
| 2 | + <!-- Explain existing problems or why this pull request is necessary --> | ||
| 3 | + | ||
| 4 | + ### Relevant issues | ||
| 5 | + <!-- List relevant issues here --> | ||
| 6 | + <!-- | ||
| 7 | + | ||
| 8 | + * Fixes #1 | ||
| 9 | + * Fixes #2 | ||
| 10 | + | ||
| 11 | + --> | ||
| 12 | + | ||
| 13 | + ## Changes | ||
| 14 | + ### API changes | ||
| 15 | + <!-- Any additions to the API that should be documented in release notes? --> | ||
| 16 | + | ||
| 17 | + ### Behavioural changes | ||
| 18 | + <!-- Any change in how the server behaves, or its performance? --> | ||
| 19 | + | ||
| 20 | + ## Backwards compatibility | ||
| 21 | + <!-- Any possible backwards incompatible changes? How are they solved, or how can they be solved? --> | ||
| 22 | + | ||
| 23 | + ## Follow-up | ||
| 24 | + <!-- Suggest any actions to be done before/after merging this pull request --> | ||
| 25 | + <!-- | ||
| 26 | + | ||
| 27 | + Requires translations: | ||
| 28 | + | ||
| 29 | + | Name | Value in eng.ini | | ||
| 30 | + | :--: | :---: | | ||
| 31 | + | `foo.bar` | `Foo bar` | | ||
| 32 | + | ||
| 33 | + --> | ||
| 34 | + | ||
| 35 | + ## Tests | ||
| 36 | + <!-- Attach scripts or actions to test this pull request, as well as the result --> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,42 @@ | |||
| 1 | + players/* | ||
| 2 | + worlds/* | ||
| 3 | + plugins/* | ||
| 4 | + bin/* | ||
| 5 | + timings/* | ||
| 6 | + *.log | ||
| 7 | + *.txt | ||
| 8 | + *.phar | ||
| 9 | + server.properties | ||
| 10 | + /pocketmine.yml | ||
| 11 | + memoryDump_*/* | ||
| 12 | + resource_packs/ | ||
| 13 | + | ||
| 14 | + # Common IDEs | ||
| 15 | + .idea/ | ||
| 16 | + nbproject/* | ||
| 17 | + | ||
| 18 | + # Windows image file caches | ||
| 19 | + Thumbs.db | ||
| 20 | + | ||
| 21 | + # Folder config file | ||
| 22 | + Desktop.ini | ||
| 23 | + | ||
| 24 | + # Mac crap | ||
| 25 | + .DS_Store | ||
| 26 | + /nbproject/private/ | ||
| 27 | + | ||
| 28 | + # Sphinx-doc | ||
| 29 | + /docs/build/ | ||
| 30 | + !/docs/requirements.txt | ||
| 31 | + | ||
| 32 | + src/pocketmine/lang/locale/ | ||
| 33 | + | ||
| 34 | + src/raklib/ | ||
| 35 | + | ||
| 36 | + src/spl/ | ||
| 37 | + | ||
| 38 | + tests/plugins/PocketMine-DevTools/ | ||
| 39 | + | ||
| 40 | + tests/travis\.sh | ||
| 41 | + | ||
| 42 | + tests/ | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + [submodule "src/raklib"] | ||
| 2 | + path = src/raklib | ||
| 3 | + url = https://github.com/pmmp/RakLib.git | ||
| 4 | + branch = master | ||
| 5 | + [submodule "src/spl"] | ||
| 6 | + path = src/spl | ||
| 7 | + url = https://github.com/pmmp/PocketMine-SPL.git | ||
| 8 | + [submodule "src/pocketmine/lang/locale"] | ||
| 9 | + path = src/pocketmine/lang/locale | ||
| 10 | + url = https://github.com/pmmp/PocketMine-Language.git | ||
| 11 | + [submodule "tests/preprocessor"] | ||
| 12 | + path = tests/preprocessor | ||
| 13 | + url = https://github.com/pmmp/preprocessor.git | ||
| 14 | + [submodule "tests/plugins/PocketMine-DevTools"] | ||
| 15 | + path = tests/plugins/PocketMine-DevTools | ||
| 16 | + url = https://github.com/pmmp/PocketMine-DevTools.git | ||
| 17 | + [submodule "tests/plugins/PocketMine-TesterPlugin"] | ||
| 18 | + path = tests/plugins/PocketMine-TesterPlugin | ||
| 19 | + url = https://github.com/pmmp/PocketMine-TesterPlugin.git | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,15 @@ | |||
| 1 | + language: php | ||
| 2 | + | ||
| 3 | + php: | ||
| 4 | + - 7.0 | ||
| 5 | + | ||
| 6 | + before_script: | ||
| 7 | + - pecl install channel://pecl.php.net/pthreads-3.1.6 | ||
| 8 | + - pecl install channel://pecl.php.net/weakref-0.3.3 | ||
| 9 | + - echo | pecl install channel://pecl.php.net/yaml-2.0.0 | ||
| 10 | + | ||
| 11 | + script: | ||
| 12 | + - ./tests/travis.sh | ||
| 13 | + | ||
| 14 | + notifications: | ||
| 15 | + email: false | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,134 @@ | |||
| 1 | +  | ||
| 2 | + | ||
| 3 | + # PocketMine-MP Contribution Guidelines | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + ## Creating an Issue | ||
| 7 | + - If you are reporting a bug: | ||
| 8 | + - **make sure that you are using the latest supported version** before opening an issue. | ||
| 9 | + - **test it on a clean test server, WITHOUT PLUGINS**, to see if the issue still occurs. If not then it may be a plugin issue. Please also indicate the result of such tests. | ||
| 10 | + | ||
| 11 | + - [Search the issue tracker](https://github.com/pmmp/PocketMine-MP/issues?utf8=%E2%9C%93&q=is%3Aissue) to check if anyone has already reported it, to avoid needlessly creating duplicate issues. Make sure you also check closed issues, as an issue you think is valid may already have been resolved. | ||
| 12 | + | ||
| 13 | + - If your issue is related to a plugin, **do not report here, contact the plugin's original author** instead. | ||
| 14 | + | ||
| 15 | + - **Support requests are not bugs.** Issues such as "How do I do this" are not bugs and will be closed. If you need help, please see [here](README.md#discussion) and do not misuse our issue tracker. | ||
| 16 | + | ||
| 17 | + - **No generic titles** such as "Question", "Help", "Crash Report" etc. A good issue report provides a quick summary in the title. If you just got a crash report but you don't understand it, please look for a line starting with `Message`. It summarizes the bug. | ||
| 18 | + | ||
| 19 | + - Information must be provided in the issue body, not in the title. No tags like `[BUG]` are allowed in the title, including `[SOLVED]` for solved issues. | ||
| 20 | + | ||
| 21 | + - Similarly, no generic issue reports. For bugs, it is the issue author'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 will be treated as spam and will therefore be closed. | ||
| 22 | + <br>In simple words, if your issue does not appear to be a bug or a feature request, or if the issue cannot be properly confirmed to be valid, the issue will be closed until further information is provided. | ||
| 23 | + | ||
| 24 | + - To express appreciation, objection, confusion or other supported reactions on pull requests, issues or comments on them, use GitHub [reactions](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) rather than posting an individual comment with an emoji only. This helps keeping the issue/pull request conversation clean and readable. | ||
| 25 | + | ||
| 26 | + - If your issue is related to the PocketMine-MP website, forums, etc., please [talk to a human directly](README.md#discussion). | ||
| 27 | + | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + ## Contributing Code | ||
| 31 | + - To contribute code to the repository, [fork it on GitHub](https://github.com/pmmp/PocketMine-MP/fork), create a branch on your fork, and make your changes on your fork. You can then make a [pull request](https://github.com/pmmp/PocketMine-MP/pull/new) to the project to compare your branch to ours and propose your changes to our repository. We use the Pull Request system to allow members of the team to review changes before they are merged. | ||
| 32 | + | ||
| 33 | + - By proposing a pull request to the project, you agree to your code being distributed within PocketMine-MP under the [LGPL license](LICENSE). | ||
| 34 | + | ||
| 35 | + - At PocketMine, **we enforce a very high standard for contributions**. This is because PocketMine-MP and its related projects are used very widely in production. While this might seem like we are being mean at times, **our priority is what is best for PocketMine-MP itself**. We try to ensure that our project's codebase is as clean as possible and ensure that only top-quality material makes it through to PocketMine-MP itself. **If a contribution does not live up to our standards, changes may be requested or the pull request may be closed.** | ||
| 36 | + | ||
| 37 | + - **Your pull request will be checked and discussed in due time.** Since the team is scattered all around the world, your PR may not receive any attention for some time. | ||
| 38 | + | ||
| 39 | + - **Avoid using GitHub Web Editor**. The web editor lacks most useful GIT features and **should only be used for very minor changes**. It is immediately clear if the web editor has been used, and if so the PR is more likely to be rejected. If you want to make serious contributions, **please learn how to use [GIT version control](https://git-scm.com/)**. | ||
| 40 | + | ||
| 41 | + - **Do not copy-paste code**. There are potential license issues implicit with copy-pasting, and copy-paste usually indicates a lack of understanding of the actual code. Copy-pasted code is obvious a mile off and **any PR like this is likely to be closed**. If you want to use somebody else's code from a Git repository, **use [GIT's cherry-pick feature](https://git-scm.com/docs/git-cherry-pick)** to cherry-pick the commit. **Cherry-picking is the politer way to copy somebody's changes** and retains all the original accreditation, so there is no need for copy-pasted commits with descriptions like `Some code, thanks @exampleperson`. | ||
| 42 | + | ||
| 43 | + - In addition to the above, **make sure you can explain your changes**. If you can't provide a good explanation of changes, your PR may be rejected. | ||
| 44 | + | ||
| 45 | + - **Create a new branch for each pull request.** Do not create a pull request with commits that exist in another pull request. | ||
| 46 | + | ||
| 47 | + - **Code should use the same style as in PocketMine-MP.** See [below](#code-syntax) for an example. | ||
| 48 | + | ||
| 49 | + - **The code must be clear** and written in English, comments included. | ||
| 50 | + | ||
| 51 | + - **Use descriptive commit titles.** You can see an example [here](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). | ||
| 52 | + | ||
| 53 | + - **Try to stick to one change per commit.** This ensures that if you create a PR with several changes, we can decide which ones we wish to include and which ones not to include. | ||
| 54 | + | ||
| 55 | + - **It is inadvisable to create pull requests with large commits** unless this has been discussed with the team beforehand. Large pull requests are difficult to review, and such pull requests may end up being closed. The only exception is when all features in the pull request are related to each other, and share the same core changes. | ||
| 56 | + | ||
| 57 | + - **You may be asked to rebase your pull request** if the branch becomes outdated and/or if possibly conflicting changes are made to the target branch. To see how to do this, read [this page](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request). | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + **Thanks for contributing to PocketMine-MP!** | ||
| 61 | + | ||
| 62 | + | ||
| 63 | + | ||
| 64 | + ### Code Syntax | ||
| 65 | + | ||
| 66 | + It is mainly [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) with a few exceptions. | ||
| 67 | + | ||
| 68 | + - Opening braces MUST go on the same line, and MUST NOT have spaces before. | ||
| 69 | + - `else if` MUST be written as `elseif`. _(It is in PSR-2, but using a SHOULD)_ | ||
| 70 | + - Control structure keywords or opening braces MUST NOT have one space before or after them. | ||
| 71 | + - Code MUST use tabs for indenting. | ||
| 72 | + - Long arrays MAY be split across multiple lines, where each subsequent line is indented once. | ||
| 73 | + - Files MUST use only the `<?php` tag. | ||
| 74 | + - Files MUST NOT have an ending `?>` tag. | ||
| 75 | + - Code MUST use namespaces. | ||
| 76 | + - Strings SHOULD use the double quote `"` except when the single quote is required. | ||
| 77 | + - All code SHOULD have parameter and type declarations where possible. | ||
| 78 | + - Strict types SHOULD be enabled on new files where it is sensible to do so. | ||
| 79 | + | ||
| 80 | + ```php | ||
| 81 | + <?php | ||
| 82 | + | ||
| 83 | + declare(strict_types = 1); | ||
| 84 | + | ||
| 85 | + namespace pocketmine\example; | ||
| 86 | + | ||
| 87 | + class ExampleClass{ | ||
| 88 | + | ||
| 89 | + const EXAMPLE_CLASS_CONSTANT = 1; | ||
| 90 | + | ||
| 91 | + public $examplePublicVariable = "defaultValue"; | ||
| 92 | + private $examplePrivateVariable; | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * Creates an instance of ExampleClass | ||
| 96 | + * | ||
| 97 | + * @param string $firstArgument the first argument | ||
| 98 | + * @param string|null $secondArgument default null | ||
| 99 | + */ | ||
| 100 | + public function __construct(string $firstArgument, &$secondArgument = null){ | ||
| 101 | + if($firstArgument === "exampleValue"){ //Remember to use === instead of == when possible | ||
| 102 | + //do things | ||
| 103 | + }elseif($firstArgument === "otherValue"){ | ||
| 104 | + $secondArgument = function(){ | ||
| 105 | + $this->examplePrivateVariable = [ | ||
| 106 | + 0 => "value1", | ||
| 107 | + 1 => "value2", | ||
| 108 | + 2 => "value3", | ||
| 109 | + 3 => "value4", | ||
| 110 | + 4 => "value5", | ||
| 111 | + 5 => "value6", | ||
| 112 | + ]; | ||
| 113 | + }; | ||
| 114 | + } | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public function doStuff(string $stuff) : string{ | ||
| 118 | + return $stuff; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + } | ||
| 122 | + ``` | ||
| 123 | + | ||
| 124 | + <!-- TODO: RFC and voting on the forums instead --> | ||
| 125 | + ### RFC and Voting | ||
| 126 | + * These are big Pull Requests or contributions that change important behavior. | ||
| 127 | + * RFCs will be tagged with the *PR: RFC* label | ||
| 128 | + * A vote will be held once the RFC is ready. All users can vote commenting on the Pull Request | ||
| 129 | + * Comments MUST use "Yes" or "No" on the FIRST sentence to signify the vote, except when they don't want it to be counted. | ||
| 130 | + * If your comment is a voting comment, specify the reason of your vote or it won't be counted. | ||
| 131 | + * After voting has been closed, no further votes will be counted. | ||
| 132 | + * An RFC will be rejected if less than 50% + 1 (simple majority) has voted Yes. | ||
| 133 | + * If the RFC is approved, Team Members have the final word on its implementation or rejection. | ||
| 134 | + * RFCs with complex voting options will specify the vote percentage or other details. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments