|
1 | | -Contributing to EssentialsX |
2 | | -=========================== |
| 1 | +# Contributing to EssentialsX |
3 | 2 |
|
4 | | -Want to help improve EssentialsX? There are several ways you can support and contribute to the project. |
| 3 | +*By contributing to EssentialsX, you agree to license your changes under the [GNU General Public License version 3](https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE).* |
5 | 4 |
|
6 | | -If you'd like to make a financial contribution to the project, you can join our [Patreon](https://www.patreon.com/essentialsx/), |
7 | | -or to make a one-off donation you can visit our [Ko-fi page](https://ko-fi.com/essentialsx). If you can't make a |
8 | | -donation, don't worry! There are lots of other ways to contribute: |
| 5 | +## Submitting code changes to EssentialsX |
9 | 6 |
|
10 | | -* Do you run a server? Take a look at our ["help wanted"](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22) |
11 | | - and ["bug: unconfirmed"](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22bug%3A+unconfirmed%22) |
12 | | - issues, where you can find issues that need extra testing and investigation. |
13 | | -* Do you speak multiple languages? If so, we always welcome contributions to our [Crowdin project](https://crowdin.com/project/essentialsx-official). |
14 | | -* Do you enjoy helping others? If so, why not contribute to the [EssentialsX documentation](https://github.com/EssentialsX/wiki)? |
15 | | - You can also join the [MOSS Discord community](https://discord.gg/casfFyh) and provide direct community support to |
16 | | - other EssentialsX users. |
17 | | -* If you're a developer, you could look through our ["open to PR"](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22status%3A+open+to+PR%22) |
18 | | - issues. We're always happy to receive bug fixes and feature additions as pull requests. |
| 7 | +If you're interested in submitting new code to EssentialsX, we accept changes via GitHub pull requests. |
19 | 8 |
|
20 | | -Submitting a PR |
21 | | ---------------- |
| 9 | +### Adding features |
22 | 10 |
|
23 | | -EssentialsX has extensive templates for PRs that detail how to submit your PR. To find out more, see the PR templates for: |
24 | | -* [Bug fixes](https://github.com/EssentialsX/Essentials/blob/2.x/.github/PULL_REQUEST_TEMPLATE/bug-fix.md) |
25 | | -* [New features](https://github.com/EssentialsX/Essentials/blob/2.x/.github/PULL_REQUEST_TEMPLATE/new-feature.md) |
| 11 | +In general, we will only consider PRs for features if they have already been discussed with the team through |
| 12 | +GitHub issues and discussions. Check the list of |
| 13 | +["open to PR" issues](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22status%3A+open+to+PR%22) |
| 14 | +and [feature request discussions](https://github.com/EssentialsX/Essentials/discussions/categories/ideas-and-feature-suggestions) |
| 15 | +before you start working on your changes. If you don't see your desired feature listed, |
| 16 | +[open a feature request](https://github.com/EssentialsX/Essentials/issues/new/choose) and wait for a response, otherwise |
| 17 | +you may end up wasting your time on a feature that we aren't in a position to accept. |
26 | 18 |
|
27 | | -Want to discuss a feature before opening a PR? Join the [EssentialsX Development Discord server](https://discord.gg/CUN7qVb). Note that this server is **not for end-users** - if you need support with EssentialsX, you should join [MOSS](https://discord.gg/casfFyh) instead. |
| 19 | +#### Keep it focused |
28 | 20 |
|
29 | | -By contributing to EssentialsX, you agree to license your code under the [GNU General Public License version 3](https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE). |
| 21 | +Please try to keep feature PRs focused around one feature. Your PR should ideally contain |
| 22 | +one feature, or a few closely-linked features. If you submit several unrelated features |
| 23 | +in one PR, the PR will not be accepted. |
30 | 24 |
|
| 25 | +### Fixing bugs |
31 | 26 |
|
| 27 | +If you're opening a PR to fix a bug, please ensure a bug report has been filed - search the |
| 28 | +[issue tracker](https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22bug%3A+confirmed%22%2C%22bug%3A+unconfirmed%22%2C%22bug%3A+upstream%22) |
| 29 | +for an existing report, and if you can't find a bug report, |
| 30 | +[create one](https://github.com/EssentialsX/Essentials/issues/new/choose) before you submit your PR. |
| 31 | + |
| 32 | +#### Unconfirmed bugs |
| 33 | + |
| 34 | +You may find a bug report with the label `bug: unconfirmed`. This means the EssentialsX team hasn't had the time |
| 35 | +to review the bug report yet or hasn't been able to confirm |
| 36 | +whether the reported issue is actually a bug in EssentialsX. You can help us by following the steps in the report and |
| 37 | +posting whether you are able to replicate this issue, ideally on the latest versions of EssentialsX and Paper. This will |
| 38 | +help us confirm issues and prioritise PRs accordingly. |
| 39 | + |
| 40 | +#### Upstream bugs |
| 41 | + |
| 42 | +You may also find bug reports with the `bug: upstream` label. This label means the issue is caused by a bug in *another |
| 43 | +project*, not EssentialsX. This includes bugs in CraftBukkit/Spigot and bugs in other plugins. It may be appropriate to |
| 44 | +mitigate an issue in EssentialsX, but please check with us in the [EssentialsX Development Discord server](https://discord.gg/CUN7qVb) before you submit a PR. |
| 45 | + |
| 46 | +### Making your changes |
| 47 | + |
| 48 | +You'll need the following to make your changes to EssentialsX: |
| 49 | + |
| 50 | +* A GitHub account |
| 51 | +* [`git`](https://git-scm.com/downloads): the Git command-line tool, used to track and save your changes |
| 52 | +* [`gh`](https://cli.github.com/): the GitHub command-line tool, used to submit your changes to EssentialsX |
| 53 | +* Your IDE of choice - we recommend [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download) |
| 54 | + |
| 55 | +If you're already familiar with Git, you can skip this next section. |
| 56 | + |
| 57 | +You'll need to clone the EssentialsX repository |
| 58 | +(`gh repo clone EssentialsX/Essentials`), then create a new branch for your work |
| 59 | +(`cd Essentials` then `git switch -c my-cool-pr`). |
| 60 | + |
| 61 | +You can then make changes using your IDE of choice. Follow the instructions in `README.md` to build and test your |
| 62 | +changes. |
| 63 | + |
| 64 | +Once you've finished, you should commit your changes (`git commit -am "My cool commit name!"`). |
| 65 | + |
| 66 | +### Submitting your PR |
| 67 | + |
| 68 | +*Even if you're already familiar with GitHub, you will need to follow these steps in order to submit a PR to |
| 69 | +EssentialsX. This ensures we have the information we need to test and review your changes.* |
| 70 | + |
| 71 | +Next, you'll need to fork EssentialsX on GitHub and push your changes to a branch on that fork. We strongly recommend |
| 72 | +using the `gh` command-line tool for this: |
| 73 | + |
| 74 | +* In your terminal, run `gh pr create`. |
| 75 | +* Select either the bug fix or feature template, depending on what your PR is for. |
| 76 | +* If you get asked `Where should we push the '...' branch?`, select `Create a fork of EssentialsX/Essentials`. |
| 77 | +* For the title, choose a title that describes what your PR does. For example, `Add more ducks to /spawnmob`. |
| 78 | +* For the body, press E. You will then need to fill in the PR template in your text editor. |
| 79 | + - Follow the instructions in the template and fill out the sections as required. |
| 80 | + - This step is important! Without it, we won't know why you've made your changes or how to test them. |
| 81 | +* Save the file in your text editor and close it, then return to the terminal. |
| 82 | +* Select `Submit` to open your PR. |
| 83 | + |
| 84 | +If you follow these steps correctly, GitHub will create a fork (if necessary) and then open a PR with your changes. You |
| 85 | +can now sit back while we review your changes. If we need to ask questions or request further changes to your code, |
| 86 | +we will review your PR and post a comment on GitHub. You can respond to our reviews and comments on the GitHub website, |
| 87 | +and you can push new changes using `git commit` and `git push`. |
| 88 | + |
| 89 | + |
| 90 | +## Submitting community translations to EssentialsX |
| 91 | + |
| 92 | +EssentialsX relies on community translations for its messages in other languages. You can help translate EssentialsX on |
| 93 | +[Crowdin](https://translate.essentialsx.net/). You'll need a Crowdin account to translate and improve messages. |
| 94 | + |
| 95 | +If your language isn't listed or doesn't have an active proofreader, please let us know on Discord (see below). |
| 96 | + |
| 97 | + |
| 98 | +## Discussing EssentialsX contributions |
| 99 | + |
| 100 | +Want to discuss something before opening a PR or translating messages? Join the |
| 101 | +[EssentialsX Development Discord server](https://discord.gg/CUN7qVb). Note that this server is **not for end-users** - |
| 102 | +if you need support with EssentialsX, you should join [MOSS](https://discord.gg/casfFyh) instead. |
0 commit comments