Skip to content

Commit be9ec16

Browse files
committed
Merge remote-tracking branch 'upstream/2.x' into 2.x
2 parents a5b3dae + fbfd7e9 commit be9ec16

File tree

289 files changed

+18131
-4809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+18131
-4809
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ contact_links:
77
url: https://github.com/EssentialsX/Essentials/discussions/categories/q-a
88
about: Visit the Q&A forum to search for previous help requests.
99
- name: Check past feature suggestions
10-
url: https://github.com/EssentialsX/Essentials/discussions/categories/ideas-and-feature-suggestions
10+
url: https://github.com/EssentialsX/Essentials/issues?q=is%3Aissue+label%3A%22type%3A+enhancement%22
1111
about: Visit the Feature Suggestions forum to view and discuss existing feature suggestions.
1212
- name: Create help request
1313
url: https://github.com/EssentialsX/Essentials/discussions/new?category=q-a
1414
about: Create a support ticket to get help from developers.
15-
- name: Suggest a feature
16-
url: https://github.com/EssentialsX/Essentials/discussions/new?category=ideas-and-feature-suggestions
17-
about: Suggest new features for EssentialsX!
1815
- name: Get help from the community on Discord
1916
url: https://discord.gg/casfFyh
2017
about: Join the MOSS Discord for community-powered EssentialsX support!
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Request a feature
2+
description: Suggest a feature you want to see in EssentialsX!
3+
labels: 'type: enhancement'
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
If you have a feature suggestion for EssentialsX, read the following tips:
9+
1. Fill out the template.
10+
This will help us understand what you're requesting and why you want us
11+
to add it.
12+
2. Keep it simple.
13+
Make sure it's easy to understand what you're requesting. A good way is
14+
to keep it to one request per GitHub issue, as we can then easily track
15+
feature requests.
16+
3. Check whether it has already been asked or added.
17+
You can search the issue tracker to see if your feature has already been
18+
requested at https://github.com/EssentialsX/Essentials/issues. You can
19+
also check the changelogs to see if the feature was recently added:
20+
https://github.com/EssentialsX/Essentials/releases
21+
4. Ask yourself: "Does this belong in EssentialsX?"
22+
There are lots of features that we reject because most servers won't
23+
need or use them. If your feature is very specific or already exists in
24+
another plugin, it might not be a good fit for EssentialsX.
25+
- type: textarea
26+
attributes:
27+
label: Feature description
28+
description: Explain what you should expect to happen.
29+
placeholder: |
30+
What feature are you suggesting?
31+
validations:
32+
required: true
33+
- type: textarea
34+
attributes:
35+
label: How the feature is useful
36+
description: Explain what actually happens.
37+
placeholder: |
38+
How is the feature useful to players, server owners and/or developers?
39+
validations:
40+
required: true

.github/workflows/build-master.yml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- 2.x
77
- dev/*
8+
release:
9+
types:
10+
- published
811

912
jobs:
1013
build:
@@ -13,34 +16,26 @@ jobs:
1316

1417
steps:
1518
- name: Checkout Git repo
16-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
1720
with:
1821
fetch-depth: 0
1922

20-
- name: Restore Gradle cache
21-
uses: actions/cache@v2
23+
- name: Set up JDK 17
24+
uses: actions/setup-java@v3
2225
with:
23-
path: ~/.gradle/caches
24-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
25-
restore-keys: |
26-
${{ runner.os }}-gradle-
26+
distribution: 'temurin'
27+
java-version: 17
2728

28-
- name: Set up JDK 16
29-
uses: actions/setup-java@v2
30-
with:
31-
distribution: 'adopt'
32-
java-version: 16
33-
34-
- name: Validate Gradle Wrapper
35-
uses: gradle/wrapper-validation-action@v1
29+
- name: Setup Gradle
30+
uses: gradle/gradle-build-action@v2
3631

3732
- name: Build with Gradle
3833
run: |
3934
chmod +x gradlew
4035
./gradlew build --stacktrace
4136
4237
- name: Archive plugin jars on GitHub
43-
uses: actions/upload-artifact@master
38+
uses: actions/upload-artifact@v3
4439
with:
4540
name: EssentialsX plugin jars
4641
path: jars/
@@ -54,22 +49,43 @@ jobs:
5449
./gradlew publish
5550
5651
- name: Prepare Javadocs
57-
if: ${{ success() && github.event_name == 'push' && github.repository == 'EssentialsX/Essentials' && github.ref == 'refs/heads/2.x' }}
5852
run: |
5953
mv Essentials/build/docs/javadoc/ javadocs/
6054
cp -r EssentialsAntiBuild/build/docs/javadoc/ javadocs/EssentialsAntiBuild/
6155
cp -r EssentialsChat/build/docs/javadoc/ javadocs/EssentialsChat/
6256
cp -r EssentialsDiscord/build/docs/javadoc/ javadocs/EssentialsDiscord/
57+
cp -r EssentialsDiscordLink/build/docs/javadoc/ javadocs/EssentialsDiscordLink/
6358
cp -r EssentialsGeoIP/build/docs/javadoc/ javadocs/EssentialsGeoIP/
6459
cp -r EssentialsProtect/build/docs/javadoc/ javadocs/EssentialsProtect/
6560
cp -r EssentialsSpawn/build/docs/javadoc/ javadocs/EssentialsSpawn/
6661
cp -r EssentialsXMPP/build/docs/javadoc/ javadocs/EssentialsXMPP/
6762
68-
- name: Deploy Javadocs
69-
if: ${{ success() && github.event_name == 'push' && github.repository == 'EssentialsX/Essentials' && github.ref == 'refs/heads/2.x' }}
70-
uses: netlify/actions/cli@master
63+
- name: Archive Javadocs
64+
uses: actions/upload-artifact@v3
65+
with:
66+
name: javadocs
67+
path: javadocs/
68+
69+
publish-jd:
70+
name: Publish Javadocs
71+
needs: build
72+
if: ${{ github.event_name == 'push' && github.repository == 'EssentialsX/Essentials' && github.ref == 'refs/heads/2.x' }}
73+
runs-on: ubuntu-latest
74+
75+
steps:
76+
- name: Setup Node
77+
uses: actions/setup-node@v3
7178
with:
72-
args: deploy --dir=javadocs/ --prod --message="GitHubActionsDeploy"
79+
node-version: 16
80+
81+
- name: Download Javadocs
82+
uses: actions/download-artifact@v3
83+
with:
84+
name: javadocs
85+
path: javadocs/
86+
87+
- name: Deploy Javadocs
88+
run: npx netlify-cli deploy --dir=javadocs/ --prod --message="GitHubActionsDeploy"
7389
env:
7490
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_JD_AUTH_TOKEN }}
7591
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_JD_2X_SITE_ID }}

.github/workflows/build-pr.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,26 @@ jobs:
1818

1919
steps:
2020
- name: Checkout Git repo
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222
with:
2323
fetch-depth: 0
2424

25-
- name: Restore Gradle cache
26-
uses: actions/cache@v2
25+
- name: Set up JDK 17
26+
uses: actions/setup-java@v3
2727
with:
28-
path: ~/.gradle/caches
29-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
30-
restore-keys: |
31-
${{ runner.os }}-gradle-
28+
distribution: 'temurin'
29+
java-version: 17
3230

33-
- name: Set up JDK 16
34-
uses: actions/setup-java@v2
35-
with:
36-
distribution: 'adopt'
37-
java-version: 16
38-
39-
- name: Validate Gradle Wrapper
40-
uses: gradle/wrapper-validation-action@v1
31+
- name: Setup Gradle
32+
uses: gradle/gradle-build-action@v2
4133

4234
- name: Build with Gradle
4335
run: |
4436
chmod +x gradlew
4537
./gradlew build --stacktrace
4638
4739
- name: Archive plugin jars on GitHub
48-
uses: actions/upload-artifact@master
40+
uses: actions/upload-artifact@v3
4941
with:
5042
name: EssentialsX plugin jars
5143
path: jars/

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
/Essentials/kits.yml
1616
/Essentials/userdata/testplayer1.yml
1717
/Essentials/usermap.csv
18+
/Essentials/usermap.bin
19+
/Essentials/uuids.bin
1820

1921
# Build files
2022
.gradle/

.idea/checkstyle-idea.xml

Lines changed: 22 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CONTRIBUTING.md

Lines changed: 93 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,102 @@
1-
Contributing to EssentialsX
2-
===========================
1+
# Contributing to EssentialsX
32

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).*
54

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
96

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.
198

20-
Submitting a PR
21-
---------------
9+
### Adding features
2210

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.
2618

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
2820

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.
3024

25+
### Fixing bugs
3126

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.

Essentials/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ dependencies {
2929
}
3030
}
3131

32+
test {
33+
testLogging.showStandardStreams = true
34+
}
35+
3236
shadowJar {
3337
dependencies {
3438
include (dependency('io.papermc:paperlib'))

0 commit comments

Comments
 (0)