### Information
This PR fixes#6641.
### Details
**Proposed fix:**
Read the private-message format from `messages.pms-to-discord`, matching
the shipped config. The settings loader currently reads
`messages.private-chat` instead, so a custom format is ignored and the
default `[SocialSpy]` text is used.
Added settings tests that load real YAML files and check the custom
format, default fallback and reload, including placeholders and
apostrophes. The Discord module now includes the core project on its
test classpath.
**Environments tested:**
OS: Windows
Java version: Temurin 25.0.4.1+1
- [ ] Most recent Paper version
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
The full Gradle build passes, including the new settings tests and
Checkstyle. Live Paper/Discord relay testing was not performed.
**Demonstration:**
The regression loads this configuration:
```yaml
messages:
pms-to-discord: "[Privado] {sender-displayname} -> {receiver-displayname}: {message}"
```
Before the fix, the actual settings loader produces `[SocialSpy] sender
-> receiver: Hello`. After the fix, it produces `[Privado] Sender ->
Receiver: Hello`. The missing-key control keeps the existing default.
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a
new
detailed bug report BEFORE opening your PR to fix it, else your PR may
be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each
issue.
-->
This PR fixes#6608.
### Details
**Proposed fix:**
<!-- Type a description of your proposed fix below this line. -->
`getAlternative` prunes collected `WeakReference`s through its own
iterator, which can remove
every entry in a bucket. The following `commands.get(0)` then throws
`IndexOutOfBoundsException`.
This stores the first live alias during the iteration and returns that
instead, or `null` when
nothing live remains, which is what the caller already tests for
(`getAlternative(label) == null` in
`EssentialsPlayerListener.CommandSendFilter`).
Confirmed with an instrumented build that logged the list sizes around
the prune loop:
```
[6608] label=w thread=Paper Async Command Builder Thread Pool - 0
entry=2 removedByUs=2 after=0 expected=0
```
Both references in the `w` bucket had been collected and the loop
removed both.
Note: this does not address the possible concurrent modification also
raised in #6608
(`altCommands` is a plain `HashMap` of `ArrayList`, modified from the
async command-send path).
That needs a separate synchronisation decision.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Debian 12
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 25.0.4 2026-07-21 LTS
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (26.2, git-Paper-112)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
Before, on every boot with a player join (5 consecutive boots,
EssentialsX 2.22.0 and
2.22.1-dev+17-382de4f, same server and plugin set):
```
[ERROR]: Could not pass event AsyncPlayerSendCommandsEvent to Essentials
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.util.ArrayList.get(ArrayList.java:428)
at com.earth2me.essentials.AlternativeCommandsHandler.getAlternative(AlternativeCommandsHandler.java:133)
at com.earth2me.essentials.EssentialsPlayerListener$CommandSendFilter.isEssentialsCommand(EssentialsPlayerListener.java:1279)
at net.ess3.provider.providers.PaperCommandSendListenerProvider.onAsyncCommandSend(PaperCommandSendListenerProvider.java:28)
...
```
Cause isolated with a temporary instrumented build logging list sizes
around the prune loop:
```
[6608] label=w thread=Paper Async Command Builder Thread Pool - 0
entry=2 removedByUs=2 after=0 expected=0
```
Both `WeakReference` in the `w` bucket had been collected and the loop
removed both.
After, with this fix (2.22.1-dev+18), same server, player join:
```
IndexOutOfBoundsException: 0
AlternativeCommandsHandler references: 0
Could not pass event AsyncPlayerSendCommandsEvent: 0
```
### Information
This PR fixes#6632.
### Details
**Proposed fix:**
PaperLib 1.0.6 reads the server version from `Bukkit#getVersion()` with
a regex that only accepts a single digit major version, so on 26.x it
reads the version as 0 and selects its synchronous fallbacks. Every
`PaperLib.teleportAsync`, `getChunkAtAsync` and
`getBedSpawnLocationAsync` call in EssentialsX then loads the chunk and
teleports on the calling thread instead of using Paper's asynchronous
API.
When PaperLib has not recognised a Paper server that is newer than 1.13,
EssentialsX now installs a PaperLib environment which selects the
handlers PaperLib would have chosen for 1.15.2 and later. Nothing
changes on servers where PaperLib reads the version correctly.
**Environments tested:**
OS: Ubuntu 24.04 (WSL2)
Java version: Temurin 25.0.4.1
- [x] Most recent Paper version (26.3, git-Paper-140)
- ~~CraftBukkit/Spigot/Paper 1.12.2~~
- ~~CraftBukkit 1.8.8~~
**Demonstration:**
`ModernPaperEnvironmentTest` checks that a 26.x version string leaves
PaperLib's own environment calling `Entity#teleport` and that the new
environment calls `Entity#teleportAsync` and `World#getChunkAtAsync`.
`./gradlew build` passes.
Handlers PaperLib selected on Paper 26.3 (build 140), read from the
bundled PaperLib by a test plugin:
Before (2.x, Paper 26.3 build 140):
```
PROBE paperlib env=PaperEnvironment version=0 asyncChunksHandler=AsyncChunksSync asyncTeleportHandler=AsyncTeleportSync isGeneratedHandler=ChunkIsGeneratedUnknown bedSpawnLocationHandler=BedSpawnLocationSync
```
After (this PR):
```
PROBE paperlib env=ModernPaperEnvironment version=0 asyncChunksHandler=AsyncChunksPaper_15 asyncTeleportHandler=AsyncTeleportPaper_13 isGeneratedHandler=ChunkIsGeneratedApiExists bedSpawnLocationHandler=BedSpawnLocationPaper
```
The same scripted run of EssentialsX commands (teleports across 12000
blocks, `/tpa`, `/home`, `/spawn`, `/back` after death, a passenger, 22
checks) passes before and after.
Co-authored-by: Raw2d <255907405+Raw2d@users.noreply.github.com>
### Information
This PR fixes#6606.
### Details
**Proposed fix:**
Passes the localized `disposal` string through
`AdventureFacet#miniToLegacy` before creating the chest inventory view
in both `Commanddisposal.java` and `SignDisposal.java`. This ensures
both legacy formatting codes (`&a&l`) and Adventure/MiniMessage tags
(`<green><bold>`) parse and render correctly in the inventory title bar.
**Environments tested:**
OS: Windows 11
Java version: Java 21
- [x] Most recent Paper version (26.2)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<img width="554" height="76" alt="image"
src="https://github.com/user-attachments/assets/6bb5b6a2-2a7b-4cf8-8d54-15776e63e2dd"
/>
<img width="388" height="223" alt="image"
src="https://github.com/user-attachments/assets/bc8f5dee-9faa-4a03-937e-37d64a283e4c"
/>
Player#hasPlayedBefore() is unreliable since the switch to
configuration-phase events, as player data is persisted during login, so
genuine first-joiners were treated as returning players. This broke
EssentialsSpawn newbie spawn/kit/announce-format (#6466).
Add a firstJoin flag to AsyncUserDataLoadEvent, derived from
EssentialsX's own user data, and use it in EssentialsSpawn and
EssentialsDiscord instead of hasPlayedBefore().
Fixes#6466
Fixes the last double-space string from #6611. This one is in the
English source, so Crowdin can't fix it: alertFormat has spaces on both
sides of <reset> and <primary>, so every alert line shows double spaces.
Italian and Korean already write it without them, the rest copied the
source. I'll fix those on Crowdin after.
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a
new
detailed bug report BEFORE opening your PR to fix it, else your PR may
be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each
issue.
-->
This PR fixes#3318 and fixes#4483.
### Details
**Proposed fix:**
<!-- Type a description of your proposed fix below this line. -->
- Created a crude `isAboveNetherRoof` safeguard for
`getSafeDestination`.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Linux (Server and Client)
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 25
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [ ] ~~Most recent Paper version (XX.YY.Z, git-Paper-BUILD)~~
- [ ] ~~CraftBukkit/Spigot/Paper 1.12.2~~
- [ ] ~~CraftBukkit 1.8.8~~
- [x] Paper 1.21.11
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
Before:
https://github.com/user-attachments/assets/250a27cf-1f11-421b-9d9f-36e0965249d3
After:
https://github.com/user-attachments/assets/38fc1db6-c364-4866-b08b-bfaa27fdaf5e
---------
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
Muted players' /msg and /r attempts threw a "silenced" error before
reaching SimpleMessageRecipient, so the socialspy-listen-muted-players
option never applied to private messages.
Move mute handling into SimpleMessageRecipient#sendMessage: a muted
sender's message is dropped instead of delivered, the sender is notified
they're silenced, and social spies still see it with the muted prefix
when socialspy-listen-muted-players is enabled. PrivateMessageSentEvent
is not fired in this case so undelivered messages aren't relayed
elsewhere (e.g. Discord).
Also adds User#notifyMuted() to dedupe the silenced-message logic shared
with EssentialsPlayerListener.
Fixes#6341
Self-teleport to coordinates called now() with cooldown disabled, so it
ignored teleport-cooldown while every other self-teleport path enforces
it. Enable the cooldown flag for this case.
Fixes#6499
The single-arg legacyToMini() facet default flipped from false to true
during the Paper adventure migration (#6220), switching message
placeholder serialization from strict to non-strict. Non-strict output
leaves format tags open, so a formatted nickname/display name bleeds its
color and formatting into the rest of the message.
Restore the default to false and drop the now-redundant <reset>
workaround in SocialSpy local chat (#6507).
Fixes#6559Fixes#6537
PatternType.getByIdentifier() causes IncompatibleClassChangeError on
1.19.4 due to a mismatch between Methodref and InterfaceMethodref
bytecode constants when compiled against a newer API.
Introduce PatternTypeProvider with two implementations:
- LegacyPatternTypeProvider: iterates PatternType.values() for 1.19.4
and older where PatternType is still an enum
- ModernPatternTypeProvider: uses Registry.BANNER_PATTERN for 1.20.5+
Update MetaItemStack.addBannerMeta to resolve PatternType through the
provider instead of calling the deprecated static method directly.
You need to select a pull request template!
If you're adding a new feature, copy and paste the following parameter
at the end of the URL:
?template=new-feature.md
If you're fixing a bug, copy and paste the following parameter at the
end of the URL:
?template=bug-fix.md
For more information about contributing to EssentialsX, see
CONTRIBUTING.md:
https://github.com/EssentialsX/Essentials/blob/2.x/CONTRIBUTING.md
Economy.add() delegated to setMoney() which checks minMoney and loan
permission against the resulting balance. Both checks reject negative
results even when the balance is improving from a deposit. Since
deposits can only move the balance upward, route them directly to
user.setMoney() bypassing the floor/loan checks. Withdrawals still
go through setMoney() with full validation.
Fixes#5606
Two paths bypassed the permission check:
1. Explicit /home bed: the permission check at line 44 was combined
with the bed-spawn logic in a single condition. When denied, it
fell through to goHome("bed") which found the stored bed home
by name and teleported anyway. Now rejects immediately.
2. Fallback respawn: when a player has no homes and isSpawnIfNoHome
is true, respawn() was called unconditionally which tries the bed.
Now checks the permission and falls back to world spawn when denied.
Fixes#5963
Two issues causing unbounded thread growth:
1. The repeating sync task was never cancelled on plugin disable,
leaking the timer itself.
2. Each sync() call spawns an async task that calls
acquireUninterruptibly() on a 5-permit semaphore. The timer fires
up to 50 sync calls per cycle, so 45 threads block indefinitely
waiting for permits. Before they drain, the next cycle spawns 50
more. Threads accumulate until OOM.
Fix: cancel the task on disable, and replace acquireUninterruptibly()
with tryAcquire(5s timeout) in both sync() and unSync() so threads
don't block indefinitely — skipped syncs retry on the next cycle.
Fixes https://github.com/EssentialsX/Essentials/issues/6381
Not only output to the players who have the "essentials.geoip.show"
permission, but also output to the console.
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR
template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR
implements
features from multiple issues, you should repeat the phrase "closes
#nnnn"
for each issue.
-->
This PR closes#5838.
### Details
**Proposed feature:**
<!-- Type a description of your proposed feature below this line. -->
Create a command to query the list of imprisoned players
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Ubuntu 24.04.4 LTS x64 bits
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: JDK21
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
**Jailed players execution with 2 players jailed who are offline:**
<img width="657" height="96" alt="image"
src="https://github.com/user-attachments/assets/45663c9f-5d87-43f7-94a2-cefca62d6c07"
/>
**Jailed players command execution with no players jailed:**
<img width="657" height="96" alt="image"
src="https://github.com/user-attachments/assets/10813887-b7ef-4291-ab12-8927d50b6a05"
/>
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
The underscore-to-backslash escaping in KeywordReplacer is needed for
item names/lores where underscores represent spaces, but Minecraft
usernames never contain spaces and their underscores must stay literal.
Skip the escaping for USERNAME keywords so player:{USERNAME} resolves
correctly for names like Player_Name.
Fixes#6296
The display name converted via legacyToMini() produces open MiniMessage
formatting tags that bleed into the subsequent message text. Append
<reset> after the display name to close any inherited formatting.
Fixes#6504
Usage descriptions were resolved once at command construction time via
tlLiteral() (server default locale) and cached. Now store the
translation key instead and resolve per-player at display time using
playerTl()/tl().
Fixes#6353
The affected/controller parameters are swapped in Commandvanish (#2604)
but cannot be fixed without breaking the public API.
Fix BukkitListener to use getController() (the actual vanished player)
instead of getAffected() (the sender, null for console), and add
inversion warning javadoc matching the NickChangeEvent pattern.
Fixes#6388
Commandeco used raw BigDecimal constructor with hardcoded period as
decimal separator, breaking input like '1.000' for European locales. Use
NumberUtil.parseStringToBDecimal() like /pay already does.
Fixes#6475
Use Paper's event.message(null) API to hide the advancement chat message
when the player is vanished (checked via Bukkit metadata). The player
still receives the advancement, only the broadcast is suppressed.
Fixes#6350
extractUrls on the default LegacyComponentSerializer caused
legacyToMini to auto-wrap URLs in <click:open_url> tags. When
translation templates like discordCommandLink already wrapped {0}
in their own click tag, this produced nested click events that
Paper 1.21.11+ rejected.
The default serializer no longer extracts URLs. A new
legacyToMiniWithUrls method is available for cases that explicitly
need clickable URL extraction (chat, broadcast).
Fixes#6463
Persist /fly state in userdata and re-enable allowFlight on login so
flight isn’t lost after relogging on ground (upstream #6344).
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a
new
detailed bug report BEFORE opening your PR to fix it, else your PR may
be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each
issue.
-->
This PR fixes#6344
### Details
**Proposed fix:**
<!-- Type a description of your proposed fix below this line. -->
Persist the /fly state to userdata and restore allowFlight on login so
flight isn’t lost after relogging while on the ground.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Ubuntu 24.04
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 21
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [x] Paper 1.21.8
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
---------
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR
template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR
implements
features from multiple issues, you should repeat the phrase "closes
#nnnn"
for each issue.
-->
I added a PreTransactionEvent for cancelling transactions between users.
### Details
**Proposed feature:**
Adding a PreTransactionEvent.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Linux Mint
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 23
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
```java
@EventHandler
public void onPay(PreTransactionEvent event) {
// Prevent money from being sent outside their own faction.
IUser userSource = event.getRequester().getUser();
if (userSource == null)
return;
FPlayer fplayerSource = FPlayers.getInstance().getByPlayer(userSource.getBase());
if (fplayerSource == null || fplayerSource.isAdminBypassing())
return;
Faction faction = fplayerSource.getFaction();
if (faction == null || !isFactionVoluntaryExcluded(faction.getId()))
return;
// Who are they sending it to?
FPlayer target = FPlayers.getInstance().getById(event.getTarget().getUUID().toString());
Faction factionTarget = target.getFaction();
if (faction != factionTarget) {
event.setCancelled(true);
msg(userSource.getBase(), cantPayOutsideExcludedFactionMessage);
}
}
```
This code prevents transactions between two users when two factions
can't interact.
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Pre-release, snapshot, and RC variants should be considered lower than
the base release version. Updated test assertions and comparison logic
to reflect that release versions are higher than their dev variants
(snapshot < pre < rc < release).
Commit 297d0e4 migrated `emoji-java` from Jitpack
(`com.github.MinnDevelopment`) to EssentialsX's own Maven repo
(`net.essentialsx.deps`), but the `include(dependency(...))` in the
`shadowJar` block was not updated to match, leaving the shadow JAR
unable to locate and bundle the dependency.
### Details
**Proposed fix:**
- Updated `EssentialsDiscord/build.gradle` shadowJar include to use the
correct group ID:
```groovy
// Before
include(dependency('com.github.MinnDevelopment:emoji-java'))
// After
include(dependency('net.essentialsx.deps:emoji-java'))
```
**Environments tested:**
OS:
Java version:
- [ ] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!-- START COPILOT CODING AGENT SUFFIX -->
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
> never updated the shadow include group id here pls fix
>
> Reference:
https://github.com/EssentialsX/Essentials/commit/297d0e460605efec9db2ca824ad20945838a1ff3
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
📱 Kick off Copilot coding agent tasks wherever you are with [GitHub
Mobile](https://gh.io/cca-mobile-docs), available on iOS and Android.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a
new
detailed bug report BEFORE opening your PR to fix it, else your PR may
be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each
issue.
-->
This PR fixes#6450 .
### Details
**Proposed fix:**
I added a check to make sure that items are only placed into the
inventory when it successfully opens.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Linux Mint
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 21
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
In order to replicate the issue, I used the following code to test:
```java
@EventHandler
public void onRecipeStop(InventoryOpenEvent event) {
if (event.getPlayer().isSleeping()) {
event.setCancelled(true);
}
}
```
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
### Information
Workflow artifact upload steps referenced incorrect jar filenames — all
addon jars are built as `EssentialsX{Addon}-*.jar` (e.g.
`EssentialsXChat`, `EssentialsXProtect`) because project names in
`settings.gradle.kts` are all prefixed with `EssentialsX`, and
`archivesName` is set to `project.name`. The upload globs were missing
the `X`, causing every per-module direct upload to fail to find its
target file.
### Details
**Proposed fix:**
Update all per-module `archive: false` upload step paths in both
`build-pr.yml` and `build-master.yml` to use the correct
`EssentialsX`-prefixed names:
| Before | After |
|---|---|
| `jars/EssentialsAntiBuild-*.jar` | `jars/EssentialsXAntiBuild-*.jar` |
| `jars/EssentialsChat-*.jar` | `jars/EssentialsXChat-*.jar` |
| `jars/EssentialsDiscord-*.jar` | `jars/EssentialsXDiscord-*.jar` |
| `jars/EssentialsDiscordLink-*.jar` |
`jars/EssentialsXDiscordLink-*.jar` |
| `jars/EssentialsGeoIP-*.jar` | `jars/EssentialsXGeoIP-*.jar` |
| `jars/EssentialsProtect-*.jar` | `jars/EssentialsXProtect-*.jar` |
| `jars/EssentialsSpawn-*.jar` | `jars/EssentialsXSpawn-*.jar` |
| `jars/EssentialsXMPP-*.jar` | `jars/EssentialsXXMPP-*.jar` |
The Javadoc `cp` paths in `build-master.yml` reference filesystem
directory names (which don't include `X`) and remain correct as-is.
**Environments tested:**
OS: N/A (CI workflow change only)
Java version: N/A
- ~~Most recent Paper version (1.XX.Y, git-Paper-BUILD)~~
- ~~CraftBukkit/Spigot/Paper 1.12.2~~
- ~~CraftBukkit 1.8.8~~
**Demonstration:**
N/A — the incorrect globs would silently produce no artifact (or an
error) for each addon module on every workflow run using `archive:
false`.
<!-- START COPILOT CODING AGENT SUFFIX -->
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
>
https://github.blog/changelog/2026-02-26-github-actions-now-supports-uploading-and-downloading-non-zipped-artifacts/
>
> update our workflows to use this rather than zipping (still provide
the zip but also individually upload
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/EssentialsX/Essentials/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a
new
detailed bug report BEFORE opening your PR to fix it, else your PR may
be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each
issue.
-->
This PR fixes missing MiniMessage support for the enabled / disabled
thunder message
### Details
**Proposed fix:**
<!-- Type a description of your proposed fix below this line. -->
Added parsing
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Linux
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 21
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] 1.21.8 Paper version
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
Before:
- Using `/burn <player> 107374183` extinguished the player.
- `/burn` accepted negative values.
- Using `/more 2147483647` deleted the held item(s) entirely.
After:
- Using `/burn <player> 107374183` sets the player on fire for 107374183
seconds correctly.
- `/burn` doesn't accept negative values.
- Using `/more 2147483647` correctly increases the held item stack to
64.
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a
new
detailed bug report BEFORE opening your PR to fix it, else your PR may
be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each
issue.
-->
This PR fixes a bug where anyone with access to the /give command could
freeze the server.
### Details
Currently, if a user has permission to spawn items with metadata, they
can freeze or completely crash the server by supplying a massive integer
for a book's page number (e.g., `/give <player> written_book 1
page2147483647:payload`).
Because there is no upper bound check in `MetaItemStack.java`, the
internal `for` loop tries to allocate an `ArrayList` with billions of
empty strings to reach that requested page index. This instantly
exhausts the JVM heap and triggers an OutOfMemoryError, hard-crashing
the server thread, or at least freezing it entirely for seconds.
This PR fixes the issue by introducing a hard limit of 100 pages for
book metadata parsing. If the requested page exceeds this limit, the
loop doesn't execute and it instead throws a newly added
`pageLimitExceeded` translatable exception.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Windows 11 25H2 26200.7922
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: Java 21 (OpenJDK 64-Bit Server VM 21.0.10+7-LTS; Eclipse
Adoptium Temurin-21.0.10+7)
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
Purpur version 1.21.11-2545
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
Before:
<img width="1401" height="269" alt="image"
src="https://github.com/user-attachments/assets/9453a449-af43-4e77-bdfe-26e63e47b634"
/>
After:
<img width="1104" height="189" alt="image"
src="https://github.com/user-attachments/assets/f1783011-92db-4518-9a4d-a831bb847261"
/>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
### What does this PR do?
Fixes an issue where `EssentialsTreeNode` instances did not receive
updated
`Essentials` and `IEssentialsModule` references after registration.
This could lead to null references during command execution,
especially in test environments.
### Changes made
- Override `setEssentials` in `EssentialsTreeCommand`
- Override `setEssentialsModule` in `EssentialsTreeCommand`
- Propagate updated references to all registered nodes
### Why is this needed?
Nodes only received references during registration.
If the parent command updated its references later,
the nodes would retain outdated (null) values.
### Does this PR break compatibility?
No.
Makes us no longer dependent on adventure-platform for Paper servers as
we will use their native adventure apis.
Few hacks needed to be done to not remap things in places but this is
the best we can do
The PaperAdventureFacet has to be in PaperProvider to avoid the kyori
remapping that happens on the entire EssentialsX module (we already did
this for PaperChatListenerProvider)
Fixes#6215
The display name was comparing getDisplayName() to itself, making it
always true which made the nickNoMore message unreachable. Now it uses
FormatUtil.stripFormat() to strip color codes before comparing against
getName(), also has a null-safety guard.
I have built it locally and tested it - it works well. Verified: "Nick
set normally", "Nick equal to Username", "Colored nick equal to
Username". Had no Errors.
I hope this message finds you well. This pull requests prevents an NPE
in getPlayerLocale for offline players.
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
This will allow us to backup dumps while issues are still open since
bytebins expire after a bit.
We will need to set `GIST_TOKEN` to a PAT for @Flask-Bot.
obviously will require new website and shouldn't be merged till.
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Adds a call to super with the correct async flag based on Bukkit's
primary thread status, ensuring proper event handling for
TeleportWarmupCancelledEvent.
fix this error:
```
[18:40:31 WARN]: [Essentials] Plugin Essentials v2.22.0-dev+278-984a0c1 generated an exception while executing task 156164
java.lang.IllegalStateException: TeleportWarmupCancelledEvent may only be triggered synchronously.
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.21.10-R0.1-SNAPSHOT.jar:?]
at EssentialsX-2.22.0-278.jar/com.earth2me.essentials.AsyncTimedTeleport.cancelTimer(AsyncTimedTeleport.java:160) ~[EssentialsX-2.22.0-278.jar:?]
at EssentialsX-2.22.0-278.jar/com.earth2me.essentials.AsyncTimedTeleport.run(AsyncTimedTeleport.java:96) ~[EssentialsX-2.22.0-278.jar:?]
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.21.10.jar:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
```
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR
template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR
implements
features from multiple issues, you should repeat the phrase "closes
#nnnn"
for each issue.
-->
### Details
**Proposed feature:**
This PR add a new event when a warmpup teleport is cancelled, and it
also expose the tpType
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Debian 12
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: OpenJDK Runtime Environment Corretto-8.422.05.1 (build
1.8.0_422-b05)
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (1.21.8, git-Paper-60-main@29c8822)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [x] Paper 1.8.8
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR
template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR
implements
features from multiple issues, you should repeat the phrase "closes
#nnnn"
for each issue.
-->
Closes#6336.
### Details
<!-- Type a description of your proposed feature below this line. -->
This adds a config option that allows disabling the logging of console
and RCON commands.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Arch Linux
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: openjdk 21.0.8 2025-07-15
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [x] CraftBukkit/Spigot/Paper 1.12.2
- [x] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
Without these changes, with the config option not set:
<img width="680" height="69" alt="image"
src="https://github.com/user-attachments/assets/92647fc0-c0c5-4e7b-9f61-953fcadd7f93"
/>
With these changes, with the config option set to false:
<img width="635" height="68" alt="image"
src="https://github.com/user-attachments/assets/fd11572c-dfe2-4b79-89ab-69e2275d2c9f"
/>
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Fixes an issue during first join with the player configuration events on
Paper. The usermap will refuse to implicitly store new users into the
usermap unless it can get a Bukkit player object for it, which is only
created during the PlayerJoinEvent. So for new users, we must defer to
then. The code that was being run (activity/mute checks) was probably
incorrect to be placed inside of configure event anyway.
Also force loads the locale bundle into memory to ensure it's ready for
servers with slow i/o.
Fixes#6315
During the gradle/shadow upgrades during the 1.21.9 update, shadow
removed implicit wildcards. Explicitly declare all shadow depends for
jackson in geoip.
Also get rid of mavenCentral since paper mirrors it, was causing
resolution issues for mockbukkit
Fixes#6313
Prevents calling setJoinMessage when the message is unchanged causing
Bukkit to no longer send the translation key to the client (nuking
vanilla translation)
Fixes#6307
```yml
# Allows to limit cached balance top (/baltop) entries. This is especially recommended if
# you have a large number of players, then only a certain number of entries will be stored
# in the server's memory. Set to -1 to disable the limit
baltop-entry-limit: -1
```
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Moves away from PlayerLoginEvent on Paper and makes use of the new
configuration state to load user/locale data during configuration phase.
Not only does this ensure all I/O is done async before the player even
joins but also finally allows us to actually set the join message in the
PlayerJoinEvent.
This also fixes#5796 and closes#5848
Fixes an issue where matchPlayer didn't always match exact matches
first.
Also adds a test for this method to ensure stuff like this doesn't
happen in the future.
Fixes#6246
Minecraft understands infinite durations to be `-1` and only `-1`. Our
second -> tick conversion was changing this to `-20` causing a potion
command with a `-1` duration to end up as `-20` and only causing the
potion to occur for 1 tick.
Fixes#5558
Adds new option to preserve flight on gamemode change.
```yml
# Should Essentials preserve a player's flight status when they change game modes?
# When enabled, if a player is flying when switching game modes, their flight will be maintained.
# This will only work if the player has the 'essentials.fly' permission.
gamemode-change-preserve-flying: false
```
---------
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR
template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR
implements
features from multiple issues, you should repeat the phrase "closes
#nnnn"
for each issue.
-->
This PR closes#6073.
### Details
**Proposed feature:**
<!-- Type a description of your proposed feature below this line. -->
Add a setting to replace usernames with UUIDs in the trade.log file
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Windows 11 Pro
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: JDK 17
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [X] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
**Before:**
<img width="1299" height="33" alt="image"
src="https://github.com/user-attachments/assets/6f34baf2-b5f5-46f6-adab-0ca0c0bf71c5"
/>
**After:**
<img width="1346" height="18" alt="image"
src="https://github.com/user-attachments/assets/672619ef-1215-4833-8320-e24bbb1c7ec0"
/>
**Command execution:**
<img width="491" height="107" alt="image"
src="https://github.com/user-attachments/assets/688efa80-3239-4bfe-8509-c998d3981637"
/>
---------
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
I would like to suggest adding an "essentials.whitelist.bypass"
permission node. This permission node allows users to bypass the
whitelist requirement on servers that have the whitelist enabled,
similar to how the "essentials.joinfullserver" permission node allows
users to bypass the player limit.
---------
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR
template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR
implements
features from multiple issues, you should repeat the phrase "closes
#nnnn"
for each issue.
-->
This PR closes#6095.
### Details
**Proposed feature:**
<!-- Type a description of your proposed feature below this line. -->
This PR implements /powertoollist, which lists out all of a user's set
powertools.
Since all of a user's powertools reside within `UserData`, I utilized
this Map to query through all of a user's powertools.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: MacOS Apple chip
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 22.0.2
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [ ] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
```
[20:36:06] [Server thread/INFO]: This server is running CraftBukkit version 4457-Spigot-73860e0-f0c8dd3 (MC: 1.21.4) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
[20:36:06] [Server thread/INFO]: Checking version, please wait...
[20:36:06] [Thread-9/INFO]: You are running the latest version
```
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
https://youtu.be/tgOr-fbHRAg
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
<!--
EssentialsX feature submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a new feature, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original feature
request. If there isn't an existing feature request, we strongly
recommend opening a new feature request BEFORE opening your PR to
implement it, as this allows us to review whether we're likely to accept
your feature in advance, and also allows us to discuss possible
implementations for the feature. If there is no associated feature
request, your PR may be delayed or rejected without warning.
You can open a new feature request by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. If you are fixing a performance issue, please use the "Bug fix" PR
template
instead. The "bug fix" template is better suited to performance issues.
3. Include a demonstration.
If you are adding commands, please provide screenshots and/or a video
demonstration of the feature. Similarly, if you are adding a new API,
please include a link to example code that takes advantage of your
proposed API. This will aid us in reviewing PRs and speed up the process
significantly.
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR
implements
features from multiple issues, you should repeat the phrase "closes
#nnnn"
for each issue.
-->
This PR closes#6178 .
### Details
**Proposed feature:**
<!-- Type a description of your proposed feature below this line. -->
Essentials should ignore cancelled PlayerDeathEvents.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Linux
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 21
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [x] Most recent Paper version (1.21.6, @aa6cd74 build: 42)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
Implements this https://github.com/EssentialsX/Essentials/issues/2864
**Specifically, this functionality:**
`afk-timeout-command: "server afk {USERNAME}"`
Sends the player to the AFK server on the server-network.
`afk-timeout-command: "litebans:kick {USERNAME} You were kicked after
{KICK_TIME} minutes of inactivity."`
Kicks the player using litebans so that it shows up in their litebans
history.
`afk-timeout-command: "none"`
Default behaviour of essentials kicking the player on afk-timeout.
---------
Co-authored-by: Jason <51760372+JasonHorkles@users.noreply.github.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Adds new protect config to cancel the knockback effect from windcharges
```yml
protect:
# General physics/behavior modifications. Set these to true to disable behaviors.
prevent:
windcharge-explosion: false
```
Closes#6181
Fixes#5878. Caused by a regression from
384f63bf92, we were checking for for the
legacy options when we should really be checking if
`mc-to-discord-name-format` is anything other than the bot name.
There are new slots that are persistent in the player inventory, the
saddle slot + the body slot, ignore them from our inventory
calculations.
Fixes#6216
Commodore breaks this on legacy likely, use a provider to ensure we use
the old ABI...................i love legacy
Fixes#6211
---------
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Fix numerous antibuild bypasses when it came to breaking blocks that
signs were attached to
BOY DO WE NEED BALLOON TO CLEAN ALL THIS STUFF UP
Fixes#5784Fixes#6173
<!--
EssentialsX bug fix submission guide
====================================
NOTE: Failure to fill out this template properly may result in your PR
being
delayed or ignored without warning.
NOTE: Don't type between any arrows in the template, as this text will
be
hidden. This includes this header block and any other explanation text
blocks.
Want to discuss your PR before submitting it? Join the EssentialsX
Development
server: https://discord.gg/CUN7qVb
EssentialsX is GPL
------------------
By contributing to EssentialsX, you agree to license your code under the
GNU General Public License version 3, which can be found at the link
below:
https://github.com/EssentialsX/Essentials/blob/2.x/LICENSE
Instructions
------------
If you are submitting a bug fix, please follow the following steps:
1. Fill out the template in full.
This includes providing screenshots and a link to the original bug
report. If there isn't an existing bug report, we recommend opening a
new
detailed bug report BEFORE opening your PR to fix it, else your PR may
be
delayed or rejected without warning.
You can open a new bug report by following this link:
https://github.com/EssentialsX/Essentials/issues/new/choose
2. When linking logs or config files, do not attach them to the post!
Copy and paste any logs into https://gist.github.com/, then paste a
link to them in the relevant parts of the template. Do not use Hastebin
or Pastebin, as this can cause issues with future reviews.
DO NOT drag logs directly into this text box, as we cannot read these!
3. If you are fixing a performance issue, please include a link to a
Timings and/or profiler report, both before and after your PR.
4. If you are fixing a visual bug, such as in commands, please include
screenshots so that we can more easily review the proposed fix.
(You can drag screenshots into the bottom of the editor.)
-->
### Information
<!--
Replace #nnnn with the number of the original issue. If this PR fixes
multiple issues, you should repeat the phrase "fixes #nnnn" for each
issue.
-->
This PR fixes #nnnn.
### Details
**Proposed fix:**
<!-- Type a description of your proposed fix below this line. -->
Allows creating a clickable confirmation button for the clear command
message.
The space prevents the command from being executed properly, as this
tries to run `'/clear '` instead of `'/clear'`.
**Environments tested:**
<!-- Type the OS you have used below. -->
OS: Linux
<!-- Type the JDK version (from java -version) you have used below. -->
Java version: 21
<!--
Put an "x" inside the boxes for the server software you have tested this
bug fix on. If this feature does not apply to a server, strike through
the server software using ~~strikethrough~~. If you have tested on other
environments, add a new line with relevant details.
-->
- [X] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
**Demonstration:**
<!--
Below this block, include screenshots/log snippets from before and after
as
necessary. If you have created or used a test case plugin, please link
to a
download of the plugin, source code and exact version used where
possible.
-->
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
for the new site, we're gonna have our own command and permissions page
and to make this less of a pain, this PR adds a gradle task which will
export that data. the resulting files end up in the root directory under
the generated folder.
gotta figure out how we automatically fetch this for the site, maybe we
make the generated json files part of the jenkins build process?
Mojang only looks for urls with 2,3 chars but if we don't block urls
with >3 their regex will still parse the url trimming the extra chars
off the tld *sigh*
Fixes#6156
Hex color codes convert to the obnoxious md5 format which massively
inflates the character count than what the user entered. Unformat the
nickname before getting the length to remain true to what the user
entered as the command argument.
Fixes#6174
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This PR significantly overhauls the comments of the EssentialsX configuration files, ensuring consistency, clarity, and overall improved grammar (validated by Grammarly and LLMs). There are still a few things that must be completed before this is ready to be merged, but no further significant changes are expected. A couple of options have been moved entirely to make more logical sense, but this will not affect any compatibility.
This allows EssentialsX Discord to send EssentialsX Chat messages to
Discord when `use-essentials-events: true` is set in the Discord config
while local chat is disabled.
It also allows plugins to hook and modify EssentialsX Chat message
contents, formatting and recipients when local chat is disabled.
1.21 Adds a new org.bukkit.spawner.Spawner class as a superclass of CreatureSpawner which now contains the setMaxSpawnDelay method. Change our test to look for the method on any superclasses too.
With the implementation of #6012, there was no permission check done when we re-add flight to user's changing worlds. This broke servers with per-world flight permissions.
Previously, our wrapper for Paper chat events did not account for other plugins modifying the message component during the event lifecycle, this will translate calls between (get/set)Message to and from legacy strings. This further add a barrier hover/click events for now but those never worked with EssXChat installed anyway and will require further refactoring at a later date in order to add support.
The LegacyPotionMetaProvider was initializing a map with enums that
don't exist on modern versions. Since this was a static variable, this
map got initialized when the test method was called, leading to a
NoSuchFieldError.
Also improved resilience of these provider-type issues again by catching
a Throwable rather than an Exception in the ProviderFactory.
Fixes#6054
Make the broadcast world command mimic the behavior of the broadcast
command which correctly parses colors from the broadcast message.
Broadcast World Command Output Before: https://i.imgur.com/aFR6Zzb.png
Broadcast World Command Output After: https://i.imgur.com/qrvb8XD.png
There has been a method for this since 1.13.
Why have we been using this for so long?
Since item NBT is now dead, this method for checking
if an item is spawn-able is defunct and produces a console
error every time the give command is ran.
This fixes issues where arguments converted implicitly from MiniMessage
are prone to bleeding into the rest of the output.
The fix mostly works since `MINI_MESSAGE_NO_TAGS` is only used for
legacy conversion, while `miniMessageInstance` is used in all other
cases normally. If that were not the case, we would not want strict
parsing everywhere since we don't enforce this in translations anyway.
Fixes#5729Fixes#5730Fixes#5732Fixes#5735Fixes#5720Closes#5728
Fixes#5694
This issue was caused by the passed predicate being excludes rather than
includes.
Also addresses a separate issue where no help output was given when no
arguments were specified and the command was sent by a player.
No linked issue; discussed on Discord with @Evidentsinger14
Also @JRoy, I refuse to believe you ever tested this feature, you're
trolling
---------
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
I18n argument mutation already converts legacy color codes
to parsed MiniMessage. This was redundant and was creating
issues with other parts of the codebase.
Starting with 1.19, sign block states are no longer persistent causing them to become dead after any call to Sign#update.
To avoid this, ensure we either always get the latest block state or update the block state after any call to Sign#update.
Purpur added a new self-referencing method that
we don't implement with our stub class. This will
prevent Player#canSee from being called for
offline players (it would be false anyway).
Invalid material names would previously return a null value
when deserializing. This raises an exception from within
Configurate because they use an EnumSet internally during
deserialization which doesn't support null elements.
Only would happen for users who haven't joined
(or been loaded by different parts of the plugin)
since the last restart. This change first of all switches to a method to fetch users which will update the User base to the UUIDPlayer dummy base. Secondly, this change will not update the base of a User to a UUIDPlayer dummy unless the base is currently null (which would be the case in the condition described above).
This commit adds two new events: GlobalChatEvent and LocalChatEvent,
which allow other plugin developers to know whether the message sent is
a global or local one and act accordingly. If either of those events is
cancelled, then the source event is cancelled too.
Since all chat-related events share the same structure, a new abstract
class ChatEvent is created with change made for LocalChatSpyEvent to use
it without breaking its API.
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Allow a permission to determine whether the nickname prefix gets applied to a group or user. It also removes a statement that is not true in the essentials config, the nickname prefix is NOT included in the nickname max length.
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
**Known issue: this inadvertently reformats `/minecraft:tell`. There's not much we can do about this in 2.19.x.**
This commit refactors EssentialsX Chat in order to support chat previews and signed chat messages in 1.19.1+.
`commons-lang3` is scheduled for removal by Spigot.
This commit reimplements the methods we use from StringUtils in StringUtil, and replaces NumberUtils.isDigits(String) with NumberUtil.isLong(String).
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This PR brings the README up-to-date, reduces the number of references to upstream Essentials, and fleshes out the contributing guide with much more detail.
If a player uses `/tpa` to request a teleport to someone with `/tpauto` enabled, `/tpa` manually creates a charge for the teleportation.
This PR changes the subsequent code to throw a `NoChargeException` instead of returning, meaning only the `AsyncTeleport` charge is applied, not the standard command one.
Fixes#4854.
This PR adds support for players to receive multiple teleport requests, which are queued and can be managed independently of one another.
All commands should retain their current behavior but have some new additions;
* `/tpaccept`: now allows you to specify a player or `*` to accept a specific player's or all players' teleport request(s) respectively.
- Using a wildcard will only accept all tpahere requests, as players can't teleport to multiple places simultaneously.
* `/tpdeny`: now allows you to specify a player or `*` to deny a specific player's or all players' teleport request(s) respectively.
This PR also adds a new setting for the maximum amount of pending TPA requests a user can have at once.
```yml
# The maximum amount of simultaneous tpa requests that can be pending for any given user.
# Once at this threshold, any new tpa requests will bump the oldest tpa requests out of queue.
# Defaults to 5.
tpa-max-amount: 5
```
Closes#3769Closes#1550
Co-authored-by: Mariell Hoversholm <proximyst@proximy.st>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Since the Configurate rewrite, we hold locations using `LazyLocation`, which is converted to a `Location` with world lookups on demand; as such we no longer need to reload configs on each world load since invalid locations will now softly fail.
Adds `essentials.seen.uuid` permission requirement to show uuids in `/seen`. People were complaining this cluttered it so whatever. Also adds said permission to the `essentials.seen.extra` permission group.
Closes#4499.
Adds a message type which will show when a player runs the /action (/me) command.
Message Type:
```yml
# Configure which Discord channels different messages will be sent to.
# You can either use the names of the channels listed above or just the id of a channel.
# If an invalid channel is used, the primary channel will be used instead.
#
# To disable a message from showing, use 'none' as the channel name.
message-types:
...
# Action messages sent when a player runs the /me or /action commands.
action: primary
```
Message Format:
```yml
# The following entries allow you to customize the formatting of messages sent by the plugin.
# Each message has a description of how it is used along with placeholders that can be used.
messages:
...
# This is the message sent to Discord when a player runs the /me or /action command.
# The following placeholders can be used here:
# - {username}: The name of the user who ran the command
# - {displayname}: The display name of the user who ran the command
# - {action}: The action (message) the user used in the command.
# ... PlaceholderAPI placeholders are also supported here too!
action: ":person_biking: {displayname} *{action}*"
```
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
my magnum opus
---
* Delete (& backup) invalid NPC accounts created by poor econ code
* Add feedback for large migrations
* Improve feedback messages
- Improve the wording of console messages
- Include details about how to resume purging userdata in case it gets interrupted
- Scale the message delay based on the number of userdata files to be processed
- Always cancel the repeating task and shut down the executor when we're done
* Update Essentials/src/main/java/com/earth2me/essentials/EssentialsUpgrade.java
* Add less ranty context to rant
At least I had caffeine before writing this
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This PR fixes various issues with NPC accounts:
- Fixes some NPC account names not being sanitised
- Fixes wrong keys being used when manually generating a NPC account file
- Adds some debug logging to `UserMap` name lookups
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This feature adds a new configuration option, `change-tab-complete-name`
When `change-tab-complete-name` is turned on, `getPlayers()` in `EssentialsCommand` will use `getDisplayName()` instead of `getName()`; populating the list with display names instead of player names.
Closes#4431.
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
```yml
# Whether or not Essentials should show detailed command usages.
# If set to false, Essentials will collapse all usages in to one single usage message.
verbose-command-usages: true
```
This PR also fixes a regression in legacy usage strings where the `<command>` wasn't replaced.
This PR allows setting `delay-motd` to a negative value in `config.yml` to disable the MOTD join task without disabling `/motd`, and fixes an issue where delayed MOTD tasks would run even after a player logged out (in case someone previously set an insanely high MOTD delay to "disable" the MOTD on join).
Fixes#4408.
```yml
# Console relay settings
# The console relay sends every message shown in the console to a Discord channel.
console:
...
# Set to true if bots/webhooks should be able to send commands through the command relay.
bot-command-relay: false
```
This wasted CPU time parsing responses from Discord that we will never use, plus caused problems when parsing webhooks that our library couldn't parse correctly (MinnDevelopment/discord-webhooks#36).
Turns out that when you depend on a plugin, get this, the plugin will load before you. So we need to rework how we do things here.
Fixes#4075Fixes#4304
* New `/mail sendtemp <time diff> <message>` command to send mail that will self-destruct after time diff.
* New `/mail clear <number>` command to clear a specific mail item.
* `/mail read` now tracks which mails you read and won't nag you about them.
* A bunch of other flexibility since we store actual data instead of strings
This PR fixes a long-standing bug where using the `a:` or `r:` modes in `/powertool` with no commands already set on the item would result in an NPE. To prevent this, the powertool command list is now immediately initialized if it doesn't exist upon retrieval.
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This PR makes use of Paper's item serialization to serialize items into base64 allowing for all items to be properly stored without needing to manual write in special cases for every complex item. There is a config option to disable using this new serialization and use the legacy ItemDB serializer since the new serializer removes the ability to manually edit/read kits.
Defaults to not enabled
Note: The new serializer places an @ sign in front of items serialized by the new format in order to quickly determine what is serialized by the new serializer and also to retain backward compatibility with the old serializer.
Att #3114
Att #2867
Att #1694
Att #31
Att #1283
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: Riley Park <riley.park@meino.net>
Co-authored-by: zml <zml@aoeu.xyz>
Migrates all uses of SnakeYAML and Bukkit's Configuration API to Sponge's Configurate.
Configurate enables us to the do the following stuff:
* Serialize YAML off the main thread
* (in the future) Automatically update our config
* (in the future) Manipulate comments in configs
* Be epic
This commit also *finally* strips out the 3.x storage/object mapping system in favour of Configurate's object mapper.
Adds run-paper plugin support as well as moves majority of logic to kotlin build scrips
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This bug occurs when a player has joined before EssentialsX was installed and a player account creation is requested through Vault while they are offline.
Fixes#4195
This PR itself does nothing on its own but creates the underlying backbone I need to make a less hacky solution in #3963 lmfao.
This PR creates a provider which uses NBT on 1.8.8-1.13 to mimic the exact structure of a PersistentDataContainer on 1.14+ which will allow us make any possible upgrades (which don't die from the lack of DFU on >1.13) work as expected. Additionally, this does not use reflection on modern Minecraft versions and thus will not need to be maintained/updated on MC version updates.
In the future, we will need to find a way to store data on tile entities (signs namely) so that we are able to store UUIDs on signs for future plans, but for now ItemStacks work to fix our spawner issues.
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
* Bumped Gradle to 7.0.2
* Now uses Java 16 for compiling to prepare for MC 1.17
* Release target is still set to 8 however
* Bumped Actions versions
* Bumped indra version(s)
* Switched from grgit to indra-git
* Fix PR GitHub Actions jars having invalid branch names
Removed an extraneous name->uuid check
This check swallowed any warnings spit out by UserMap#trackUUID causing problems
for plugins which didn't check the success of this method and thus leading to
possible stack overflow exceptions or other unexpected behavior
Actually save accounts created with VaultEconomyProvider#createPlayerAccount
Complete oversight as I was under the impression tracking the UUID would create
the files for us.
This commit:
- Implements a new provider for VaultAPI's `Economy`
- The legacy provider built into Vault uses player names, and has not changed since Vault was invented in 1864.
- This properly supports UUIDs and works more predictably with EssentialsX.
- Replaces the Register method economy abstraction layer abstraction layer with a new `EconomyLayer` economy abstraction layer abstraction layer.
- This opens the pathway for future economy abstraction layers to be supported.
- This change also removes dubiously-licensed code from the project.
For users encountering userdata issues on this build, see this FAQ entry:
https://github.com/EssentialsX/Essentials/issues/3956#issuecomment-779254544Fixes#4110.
Closes#3344.
Closes#2401.
This PR fixes issues related to timed teleports. All timed teleports before this PR would create their own future to send back to the AsyncTeleport api causing the futures returned in the base methods never being completed.
This PR pases the future returned in AsyncTeleport methods to the timed teleport and completes it after the timed teleport has been completed.
Fixes#4065.
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Adds an update checker to Essentials that will check for the latest version on startup, on player join (permission is `essentials.updatecheck`), or manually with `/ess version`.
On startup, the update checker will fetch build information from a resource generated at compile time and determine if the build is a dev or stable build. If it's a stable build, the update checker will only check for a new release; while a dev build will check for any new commits.
There are 6 different types of messages the update checker will return;
* Identical: The current build is the latest stable release or latest dev build. This message is only shown in the `/ess version` command.
* Behind: If the current build is stable, it's an entire stable build behind, otherwise it's one or more dev builds behind.
* Diverged: The current build was made from a branch other than `2.x` and is also one or more dev builds behind the latest commit on `2.x`.
* Diverged Latest: The current build was made from a branch other than `2.x` but is based on the latest commit from `2.x`.
* Unknown: The current build either has invalid build information or was customly built. This message is show everywhere but on player join.
* Error: There was an error while fetching the latest version information.
Update checks can be disabled using the `update-check` option in `config.yml`.
Paper has recently added adventure as a first part library, and thus has shaded it in. Adventure is on maven central, so we must add it in order for Essentials to build.
Adds `copy` and `paste` subcommands to `/editsign` to allow users to copy and paste the contents of signs without having to use the tab-completion output of `/editsign set`.
The `/editsign copy` command will also perform format-permission checks to ensure the user copying the sign has the proper permission to use said formatting.
Closes#3973.
Fixes a behavior previously possible before c6de771
I wrote the proper logic in c6de771 to handle blank currency symbols but forgot to remove the Settings check that was preventing blank currency symbols.
Fixes#3945.
Co-authored-by: Mariell <proximyst@proximyst.com>
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
This moves storage of balances from the baltop command into the UserMap. This was needed by Glare to able to get a hold of all users balances without causing jvm hell on the usermap.
To access this API as an end user;
```java
import net.essentialsx.api.v2.services.BalanceTop;
//...
BalanceTop api = Bukkit.getServer().getServicesManager().load(BalanceTop.class);
```
Closes#3100, closes#3540
This PR updates the issue form to the new schema, which will be introduced on February 19th.
The legacy issue form will be used until the switchover date.
This commit improves the logging of a few edge cases that can lead to loss of userdata:
- Third-party plugins forcing creation of a NPC account which could not be found on the usermap, even if the account file exists
- UserMap#trackUUID being called with a conflicting UUID but replace set to false
Co-authored-by: triagonal <10545540+triagonal@users.noreply.github.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This commit:
- Introduces a bug reporting form
- Moves feature requests and support requests to Discussions
- Adds a default PR template instructing people to use the correct template
- Adds GitHub Sponsors and Open Collective to the Sponsor button
Bukkit sometimes decides that state changes are also a block placement. Work around this by comparing the previous block state with the new block type.
Fixes#3150.
Adds a config option to allow to prevent socialspy from reading private messages. Useful if all you want from social spy is to read commands defined in the list.
Closes#1095.
Adds support for parsing fireworks charges (would previously cause exceptions due to illegal casts to FireworkMeta) and fixes createkit from producing invalid color values
Thanks to triagonal for reporting the exception caused by createkit.
Fixes#1283.
Adds `jail-online-time` config option to only count a player's online time to the jail cap.
This also fixes memory leak in `EssentialsTimer` which I found in the process of testing.
Closes#429.
Adds a config option to have player auto-equip armor from kits.
Also adds a performance improvement for all uses of EnumUtil#getAllMatching by switching it to an EnumSet.
Closes#347, closes#3452.
* Made currency symbol standardized in Kit
* Kits should be in a standardized format.
* Having monetary rewards in kits should not break based off of a config value oriented around currency display (suffix).
* Additionally, the dollar sign should be the standard money symbol which works on all servers and should not be tied to the server's individual currency symbol.
* Note that the server's individual currency symbol will still work but probably should not be used due its volatility.
* Reworked config currency symbol parsing in Settings
* Simplifies the number of actions needed to sanitize the input.
* Now just defaults to `$` if the currency-symbol cannot be parsed.
* Removed symbol-suffixed parsing in NumberUtil#sanitizeCurrencyString
Replace modified bStats Metrics 1.7 class with official 1.8 artifact. 1.8 adds random submit intervals and changes the way submissions are scheduled, and our custom modifications are no longer needed as we now use the plugin ID.
The countless support tickets from users of TacoSpigot (and forks of it)
have become so numerous it's not worth holding our ground on this. Taco fucked up
by going against upstream revision numbers, but as they're defunct, it's not
going to change now. We will not fix server implementations that do this in the
future, but hopefully they have all learned their lesson to use proper
versioning. The way md_5 intended.
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Closes#2756.
Notes:
- I've kept original name for internal purposes (storing bans, etc), just in case user wants to rename it to something unbearable;
- User can message console via both names (since he can try both, duh);
- Some refactoring. Just a little.
Fixes#3723, where respawn anchors explode at charges > 0 when glowstone isn't in the players hand, or at charges = 4 on right click regardless of item.
There was a minor issue with one line of code in delhome which was causing the user's homes not to be listed since the condition was effectively reversed. This was also causing an NPE for console senders attempting to tab complete.
Fixes#3774
Uses new method of ray-tracing to target block instead of using BlockIterator which doesn't respect the player looking at a different y-level. Falls back to old BlockIterator method on server versions older than 1.13.2
Fixes#3756.
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>
This PR makes HelpInput use knownCommands in the command map, rather than relying on plugin descriptions. This means that commands that have been registered programmatically (or impromptu) will be recognized and displayed in the help menu.
The ugly reflection is due to Spigot not exposing the command map getter. This has been tested on Spigot 1.8, 1.16.3 and Paper 1.16.3 with plugins that register commands directly to the command map.
Closes#3662
This PR changes the default placeholder `{0}` to username. Display name can still be used with `{5}`.
Before change:
messages.properties
`itemSoldConsole=\u00a7e{0} \u00a7asold\u00a7e {1}\u00a7a for \u00a7e{2} \u00a7a({3} items at {4} each).`
console
`[Essentials] ~test sold dirt for $64 (64 items at $1 each).`
After change:
messages.properties
`itemSoldConsole=\u00a7e{0} \u00a7asold\u00a7e {1}\u00a7a for \u00a7e{2} \u00a7a({3} items at {4} each).`
console
`[Essentials] pop4959 sold dirt for $64 (64 items at $1 each).`
messages.properties
`itemSoldConsole=\u00a7e{5} \u00a7asold\u00a7e {1}\u00a7a for \u00a7e{2} \u00a7a({3} items at {4} each).`
console
`[Essentials] ~test sold dirt for $64 (64 items at $1 each).`
Started looking into #3116 but noticed this issue and wanted to fix it first.
Also added a comment as to why the username is truncated as this took me a long time to figure out and seemed arbitrary. Probably could truncate the username later for trade signs only as other signs don't require any username to be present on the sign. However, for now I simply opted to document.
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>
* Forces use of issue templates
* Auto-labels issue templates
* Links to discord in the issue-create matrix as a better form of troubleshooting
Fixes#3612, in which `/list`'s tab complete previously revealed the presence of vanished players in certain groups, and fixes#3613 in which `/time set` did not properly check whether the player had permission to change the time.
This PR updates and improves LocationUtil#isBlockDamaging. Notably, the lava check is fixed (it was not working on older versions of Minecraft), many newer materials that were missing damage checks have been added, and the code is a bit cleaner. I've tested this code on MC 1.8 and 1.16 and everything should work correctly.
Adds an `amplifier:<value>` potion meta attribute to MetaItemStack that applies a raw amplifier value, instead of translating inputs between 1 and 3 to match their vanilla names like `power:<value>` does. This matches the Mojang `/effect` command, which doesn't translate any potion effect amplifiers, and allows for creation of level IV potions (using `amplifier:3` instead of a `power` value) through EssentialsX without breaking existing usages of `power:<value>`.
More context for this commit can be found at https://github.com/EssentialsX/Essentials/pull/3592#issuecomment-678656107.
Closes#3592 and fixes#3589.
Previously, disabling creeper explosion block damage with the `protect.prevent.creeper-explosion` setting would also prevent players getting hurt. This fixes this, meaning servers can disable creeper block damage while still allowing players to take damage from creeper explosions.
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>
Fixes#3579 (async `/skull` command)
Fixes#3336 (improve codestyle of commands)
Partially addresses #3339 (`/spawn` and `/setspawn` are now hidden from tabcomplete)
Closes#3087 (`/paytoggle` is now a loop command)
Closes#1332
The spawner delay feature has been broken in Essentials for as long as anyone can remember. The reasons for this are mentioned in the issue above.
This PR fixes this by changing the command to utilize new API for setting the minimum and maximum spawn delay on spawners. This API was added in 1.12.2, so all supported versions before that (1.8.8 thru 1.12.1) require NMS to function properly. I'm aware that Essentials avoids NMS for maintainability reasons, however that should not be of much concern here since all versions 1.12.2 and later are going to be using the Bukkit API. Hence, no NMS updates will be necessary.
Also let me know if you want the NMS code refactored somewhere else. I saw the net.ess3.nms packages, but I wasn't sure where this would fit into the organisation of that.
Tested on:
1.8.8, 1.9.4, 1.10.2, 1.11.2 (NMS)
1.12.2, 1.15.2 (Bukkit API)
Aims to provide a better and less confusing error for users of GeoIP who have not configured properly (which is more common now after the license key requirement). Seems like a lot of people miss the initial error on startup, and so this may help a bit.
Closes#3561.
d9bf099c3d introduced a regression where `/tpaccept` no longer unconditionally cancels the teleportation request when it is accepted. This restores the previous request cancellation behaviour.
Fixes#3563.
Copies the list of viewers before iterating over it to fix a rare CME that is *sometimes* thrown. It's not clear *why* this broke - Spigot seems to have changed behaviour in late 1.15 or 1.16?
Fixes a problem where skeleton trapped horses cannot be killed in commands such as `/remove skeletonhorse` (or even `/remove all`) because they are tamed by non-player entities. There is a separate command for killing tamed entities, however this kills other player-owned entities which is undesirable.
This can be replicated easily by spawning some skeleton traps like so:
`/summon skeleton_horse ~ ~ ~ {SkeletonTrap:1}`
and then attempting to run `/killall skeletonhorse`.
After this small change, any tamed skeleton horses will be retained, but non-player-owned skeleton horses will be removed as appropriate.
Closes#3475.
Adds an event which allows developers to see & cancel when users attempt to teleport home. This event is needed over `PreTeleportEvent` due to the fact that it would be extremely difficult to accurately filter it by the /home command.
Closes#3401
This PR replaces UserTeleportEvent with two new teleport events called at different stages:
- TeleportWarmupEvent; called before a user's teleport warmup begins and allows plugins to skip it or prevent a teleportation
- PreTeleportEvent; called after the warmup completes but before any safety checks are carried out
This is a **breaking change** as it removes UserTeleportEvent, but the previous event isn't useful or descriptive in its current form and was only recently introduced, so it's unlikely that many plugins already depend on this.
Closes#2506.
Adds `/tpr` and `/settpr` commands, which respectively allow you to teleport randomly or set teleportation parameters.
Server owners are expected to set the center with `/settpr` before players can use `/tpr`. They can also set the minimum and maximum range to be teleported from the center (default 0-1000).
Also includes an event where plugins can adjust or cancel the teleport.
Closes#3154.
This PR introduces a new private messaging related event `PrivateMessageSentEvent` and fixes a mistake made on my part during the implementation of `PrivateMessagePreSendEvent`.
Recently when attempting to use the pre-send event in order to play a sound to the recipient of a message, I found that the event was not completely adequate for my use case. Between the firing of the pre-send event and the end of the delivery attempt, the message delivery could fail for a number of reasons (e.g. messages toggled off, sender ignored, unreachable recipient) with no straightforward way of determining this using the existing event.
I believe that a second event fired after the message sending attempt has been fully processed will provide a simple method of determining whether or not a message was successfully delivered by including the [`MessageResponse`](https://github.com/EssentialsX/Essentials/blob/60f54ee37d9472848e28d2e64adc2735e10975c1/Essentials/src/com/earth2me/essentials/messaging/IMessageRecipient.java#L84) in the event.
Additionally, I found that when implementing the pre-send event, I mistakenly passed an incorrect reference for the `sender` meaning that currently there's no clean or reliable way to determine if `sender` is the `Console` or a `User` (`instanceof` doesn't work, which leaves checking by name or using reflection).
This subtly changes how backend permissions plugins are reported on
bStats. (Previously, somehow the LP service provider was detected as
originating from Vault...?)
This PR updates the version of the bStats Metrics class to the latest version, supporting plugin IDs in place of just plugin names. It also adds the following graphs:
- Active permissions backend
- Active economy backend
- Whether or not a command has been used as a bar chart (pending bStats backend implementation)
- Version history graph as a multiline graph (also pending bStats impl)
It also removes the weird `getMetrics` and `setMetrics` APIs which should never have been API in the first place.
This allows deleting kits ignoring case; fixes#3370.
I don't know if this is the ideal fix, but everything else for kits seems to nuke the letter casing. Not really sure why in `Kits.java`, the keys needs to get lowercased in a new mock `ConfigurationSection`. It just seems like this would purely make it harder to access the same section again in the real config. Instead, I just added a different method that matches the real config name of the kit (as set in `/createkit`, which currently allows uppercase).
Fixes#3189
This PR makes improvements to the suicide and kill commands, namely:
1) Call `EntityDamageEvent` with damage equal to `Float.MAX_VALUE`, which is the amount that is inflicted by `/minecraft:kill`.
2) Removes the calls to `Damageable::damage` which ends up damaging the player with `DamageSource.GENERIC`, and later causing another `EntityDamageEvent` where as a result the last damage cause gets set to `EntityDamageEvent.DamageCause.CUSTOM`. Thus, the `EntityDamageEvent` that Essentials calls gets rendered useless when someone tries to get the damage cause of the player in `PlayerDeathEvent`. Setting health to zero forcibly kills the player without causing damage.
3) Add `getTabCompleteOptions` to the suicide command, as it currently incorrectly suggests players.
This PR replaces the current `items.json` file with one generated *solely* by ItemDbGenerator.
In 1.13.x, the `items.json` shipped with EssentialsX was generated using the [genItemsFlat script and data](https://github.com/md678685/essx-scripts). For 1.14 and 1.15, this was merged with the output of [ItemDbGenerator](https://github.com/EssentialsX/ItemDbGenerator), but this is an awkward and unreliable process involving three separate tools. This has now been consolidated into a single tool, which is now on par with the old process.
This PR reduces the number of sync loads occurring on any teleport caused by essentials.
Fixes#2861Fixes#2287Fixes#3274Fixes#3201Fixes#2120
Before this PR, essentials would get a block multiple times causing sync loads to check if it was safe to teleport to. Now, the target block's chunk if fetched async with PaperLib and passed along to `LocationUtil#isBlockUnsafeForUser` (which internally calls other LocationUtil methods what that chunk object) resulting in the chunk only loading once, off the main thread. The only operations remaining on the main thread is `LocationUtil#getSafeDestination`. This is due to the method's recursion which would be a pain to move async. **However:** since the chunk was already loaded async, `LocationUtil#getSafeDestination` most of the time won't cause sync chunk loads. The only time it would cause sync chunk loads is with an unsafe location near a chunk border.
-----------------------------------------
* Reduce sync teleporting loads
* Avoid argument re-assigning
* Remove async teleports when unnecessary
* Make exceptions cleaner
* Async all the things
Made an async version of every method with fallbacks for deprecated methods.
* Remove old now fallback method
* Migrate everything to the new async teleport API
* Update ITeleport javadocs
* Fix invoking via async context
* Fix /jail using deprecated method
* Fix jail join handler using deprecated method
* Rename all teleport classes to indicate async
* Remove deprecated methods
* Add (and deprecate) old teleport api
* Revert TimedTeleport.java
* Reduce Diff
* Add legacy sendToJail method
* Reduce Diff Further
* Use getNewExceptionFuture in Commandtpo
* Use getNewExceptionFuture everywhere
* Fix even more usages
* Revert LocationUtil.java
* Fix issue causing unsafe locations to not work properly
* Add deprecated notice in IUser implementation
* Use CompletableFuture#completeExceptionally for exceptions
* Use Essentials' logger in EssentialsCommand#showError
* Return implementation rather than interface
* Avoid possible deadlocks with entity ejections
* Nuke some sync loads with homes
Took 7 hours and 2 PRs to paper but it's here!
* Fix ABI and make the codestyle worse
* Make the codestyle worse because muh diff
* Further ruin the codestyle
* Fix error messages not showing in TimedTeleports
* Improve messages around beds for /home
* Fix#3274
Allow unsafe locations for different worlds + spectator mode
* Fix fly safety operators
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: pop4959 <pop4959@gmail.com>
Adds protection settings to Protect to block item damage when entities such as wither skulls, fireballs, TNT and creepers explode.
Closes#2284.
Add an optional `serialize` method to `ItemResolver`s which plugins can implement in order to add custom items to `/createkit`. Also improves ItemResolver docs.
Closes#3305, closes#3216.
Adds an `allow-selling-named-items` config option, which allows server admins to enable/disable the ability to sell named items with `/sell`.
Closes#1988.
Closes#908.
Closes#2196.
Co-authored-by: triagonal <10545540+triagonal@users.noreply.github.com>
"The player's bed respawn point is still set by Minecraft even if `update-bed-at-daytime` is set to `false` in config, meaning that the entire feature is indeed ineffective on Minecraft 1.15 and above."
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Based on edaa4f6, this allows messages files to be read in UTF8 without the need for native2ascii conversion. This also removes the native2ascii-maven-plugin, previously used to convert Crowdin translations to a compatible format. I've tested this briefly and it appears to work correctly with both internal translations and custom messages.
As discussed in #2960. Allows Essentials to register contexts with permission plugins that support them. A working implementation for LuckPerms is included in this PR. PermissionsEx 2 also has support for registering contexts, however it should probably be added at a later date, since as per zml2008 on Discord, the API is not yet stable.
https://user-images.githubusercontent.com/17698576/82718550-f5507500-9c57-11ea-970d-9d5f8bce8037.png
There is an age old issue in Essentials which causes date diffs (such as those displayed in teleportation delays, mutes, and temp bans) to display incorrectly to the user when the command is run. After looking into this a bit, it looks like the reason for this is that if there is even a 1 ms time difference between parsing the date diff and displaying it, the time displayed will be truncated by an entire second. This PR fixes this problem by adding 50 ms of buffer time to the date object *only* when it is calculating the date diff string. This is not significant enough to be noticed by users, and allows Essentials code to correctly generate the date diff string as long as it does so within 50 ms of parsing it.
As a theoretical example... lets say a user is muted for 1 year. If 1 ms passed (in code prior to this PR) between parsing and displaying the date diff, then the displayed time will be 11 months, 29 days, 23 hours. This is because 1 year - 1 ms is being truncated down and then Essentials lops off time accuracy beyond the 3 most significant terms. After this PR, the date diff will be parsed normally, but when the display string is being calculated, it will use 1 year + 50 ms (and if 1 ms passed, then that would be 1 year + 49 ms), which gets truncated to 1 year.
As a practical example:
https://user-images.githubusercontent.com/17698576/82106444-d55c0700-96d5-11ea-8290-377442e4f9fe.png
Quite often (I'd say about half of the time) before this PR, the date diff will display like this, when the example command `/mute <player> 1y` is run.
https://user-images.githubusercontent.com/17698576/82106467-063c3c00-96d6-11ea-9da2-3dc1556add14.png
After this PR, the date diff displays correctly every time.
Fixes#3349.
This caused a seemingly-unrelated error where the 1.7/1.8 provider was being used on all versions up until 1.12. Upon further investigation, this line caused a NoSuchFieldError, and since this isn't an Exception it was caught by the outer `catch (Throwable t)` which was intended to catch throwables from the providers rather than the setup of tryProvider.
Fixes#2986Closes#3050Closes#3191
Refactors the clearinventory command code in such a way that fixes the problem of not being able to clear all of a specific item on newer server versions. Also re-adds data value support for older server versions that support it, which seemed to have been inadvertently removed in 79bc340.
Checked against 1.8.8, 1.12.2, 1.13.2, 1.15.2.
This PR removes the 1.8 R1 and R2 spawner providers. I was looking into refactoring these to use reflection instead of importing NMS code (in order to avoid requiring buildtools to compile), but after some research it looks like these are actually not even used anymore, in favor of the LegacySpawnerProvider (which Essentials appears to use for 1.8.0-1.12.2). Thus, keeping these is fairly pointless and causes more harm than good. There is no reason to continue including them, nor maintaining them. Essentials currently doesn't even officially support these versions anyway.
This PR introduces an event to be called just before a private message is sent to a user. This event provides the message sender, the message recipient, and the contents of the message.
This event provides the possibility for greater customization of private messages, such as playing a sound or displaying a boss bar when a private message is received, or filtering private message content.
Closes#726, closes#2097.
Implements a specific permission node to restrict access to extinguishing other players, so Extinguish command will match other commands with similar functionality (i.e. /feed)
Fixes#2796
Implements a rest command based on @mart-r's suggestion in #2299. Resetting the time since rest statistic prevents phantoms from coming after you for an hour (real time). The statistic is also set to zero when using a bed. This command cannot be used pre-1.13 because the statistic does not exist (nor would it matter since there are no phantoms).
Closes#2299
Waits for an ongoing backup task to complete in onDisable (and yells at users for `/reload`ing), and adds a `backup.always-run` option to enable always running backups even when no users have logged in since the last backup.
Fixes#3257 and closes#2646.
Rather than spitting out a stacktrace, this gives users some instructions on what to do.
It's a bit spammy so the error messages get noticed, that could be toned down a bit if we just want to be silent on login. Unfortunately a lot of plugins haven't discovered the debug and trace log levels, so a lot of startup warnings (like this one) will get lost in the spam if there aren't other issues.
This would only become a problem if a server owner decided to delete a bunch of their userdata. Nonetheless, it doesn't hurt to have the check.
I promise this is the last pull request regarding this 😄
Adds methods to the Economy API to use UUIDs and User objects. Additionally, deprecates all the username (String) based methods. Backwards compatibility has been maintained and I added User validation to UUID-based methods and null checks in User-based methods
Fixes#2305
Not looking for hidden players within the command, yet looking for offline players.
Only matching a hidden player if the name match was exact (i.e not matching nicknames).
Fixes#1337😎
This PR fixes tab completions for all of the home commands in Essentials. Prior to this PR, the behavior is approximately as follows:
- `/sethome` has no implementation for completions, and so it provides player names, which isn't very useful, and in my opinion can cause more harm than good by confusing users.
- `/home` and `/delhome` fail to provide valid completions when a user has the `essentials.home.others` permission. The argument syntax is `[player:]<name>` but it tries to complete it as `<player> <name>`. Not only does it not show you suggestions for your own homes, but it proceeds to show you invalid suggestions!
This PR provides completions that accurately reflect the syntax and real behavior of the command, including suggesting homes for player names that are partially matched. It will provide suggestions for all of your own homes, as well as providing suggestions based on how far along you are in the command (players if you haven't specified `:` yet, otherwise a specific player's homes).
Co-Authored-By: md678685 <1917406+md678685@users.noreply.github.com>
Adds getTimestamp and getReason methods to MuteStatusChangeEvent with the apropriate JavaDocs explaining them.
Closes#2459.
This aims to reduce the unintended consequences of granting all Essentials permissions or giving a player op, by defaulting permissions some more permissions to false, including `essentials.hat.prevent-type.<type>`. There's also a new essentials.exempt metapermission to have one parent that controls exemption from kick/ban/mute/etc. This will change behaviour for ops to some extent.
Closes#2141.
This PR adds the option to toggle whether or not EssentialsX should handle disabling player flight / speed when they switch to a new world, in case server administrators are handling that via a third party plugin.
* New translations messages.properties (Russian)
* New translations messages.properties (Portuguese)
* New translations messages.properties (Hebrew)
* New translations messages.properties (Japanese)
* New translations messages.properties (Latvian)
* New translations messages.properties (Lithuanian)
* New translations messages.properties (Norwegian)
* New translations messages.properties (Polish)
* New translations messages.properties (Portuguese, Brazilian)
* New translations messages.properties (German)
* New translations messages.properties (Romanian)
* New translations messages.properties (Serbian (Latin))
* New translations messages.properties (Slovak)
* New translations messages.properties (Spanish)
* New translations messages.properties (Swedish)
* New translations messages.properties (Thai)
* New translations messages.properties (Greek)
* New translations messages.properties (French)
* New translations messages.properties (Italian)
* New translations messages.properties (Chinese Simplified)
* New translations messages.properties (Turkish)
* New translations messages.properties (Hungarian)
* New translations messages.properties (Vietnamese)
* New translations messages.properties (Korean)
* New translations messages.properties (Basque)
* New translations messages.properties (Bulgarian)
* New translations messages.properties (Chinese Traditional)
* New translations messages.properties (Finnish)
* New translations messages.properties (Chinese Traditional, Hong Kong)
* New translations messages.properties (Croatian)
* New translations messages.properties (Czech)
* New translations messages.properties (Danish)
* New translations messages.properties (Dutch)
* New translations messages.properties (English, United Kingdom)
* New translations messages.properties (English, United States)
* New translations messages.properties (Estonian)
* New translations messages.properties (Ukrainian)
As a result of #2780 (oops) the self-AFK messages can no longer exactly match the regular AFK messages as the placeholder for the player's displayname was left out for the self messages.
This PR adds those placeholders so that those who would prefer that these messages are the same can simply copy their messages from the normal `userIs*Away*` keys to the new `userIs*AwaySelf*` keys.
(description from #2608)
So... I've implemented a system for toggling whether or not AFK messages are broadcasted to the entire server and also changed a few things along the way:
1. I added a config toggle broadcast-afk-message that will change whether AFK messages are broadcast globally or not.
2. In both cases the AFK target now recieves a "self-oriented" message instead of the global default. Basically just says "You are now/no longer AFK". This would be a change from the default behaviour.
3. I created a way to exclude certain IUsers from broadcastMessage messages using an IUser... varargs parameter. I wasn't too sure how to implement the exclusion, but this seemed like a fairly good option.
I'm not too sure if what I've come up with is an optimal solution, but it's been tested and confirmed to work as intended.
closes#2116, closes#959
---
* implement toggle for broadcasting afk message
* add "self-private" AFK messages, implement exclusion system for broadcastMessage
* remove rogue import, clarify config comment
* move excluded collection creation out of loop, use set instead
* use set instead of varargs
* ok but actually use the set this time
* address requested changes
* update missed message section
* move from Collection to Predicate for broadcast exclusion
* update Predicate variable name
* use identity comparison (cleanup)
* clean up unnecessary imports, remove extra spacing
This PR fixes some issues with the config.yml:
* Adds links to the EssentialsX docs where appropriate
* Moves a couple of settings into their correct locations
* Changes headers to remove the weird implications of modularity (EssentialsHelp isn't a module, it's *one* command)
* Updates support link at top
* Minor grammar nitpicks
wget is nonfunctional in git bash for windows, so we should use curl instead
(no matter what you pass to wget it fails with the same error)
https://i.imgur.com/YDw68vM.png
* implement /offlinetp command, teleports to a player's last known logout location
* send a message to /tp user when they try teleporting to an offline player
* getHidden is now false, you are no longer able to teleport to offline players using offline tp
* change /offlinetp to /tpoffline to match essentialsx conventions
This reduces permissions checks by only checking each command once, not checking each command for each alias.
The impact of this is a near-tenfold reduction in permission checks during this listener, which should slightly improve performance when using LuckPerms (and provide significant improvements on older inefficient permissions plugins).
Since most (if not all) modern permission plugins only use lowercase group names, the examples should also be lowercase. A note has also been added explaining that group names are case-sensitive.
Short term replacement for #2897 until ItemDbGenerator is complete:
* Closes#2934 by adding 1.15 items
* Closes#2790 by adding minecraft:sign fallbacks and a "sign" alias
* Closes#2732 by adding aliases and fallbacks for cactus green/green dye, dandelion yellow/yellow dye and rose red/red dye.
CustomItemResolver was fetching the custom item from the item database instead of the resolved custom item which caused a StackOverflowError.
Fixes#3018.
This implements the fix suggested by @Bobcat00 in #2919
Users of GeoIP will now be required to register a MaxMind account and create a license to download the database required by the plugin. This license is entered into the new license-key field in the configuration.
---
* Update GeoIP
* Simplify branch
* Update old config detection
* Update geoIpLicenseMissing to point to the EssX wiki
* Move `essentials.build` perm check from AntiBuild into default SuperPerms handler
* Don't emulate wildcards for LuckPerms or PEX
* Add `build: true` meta support for LuckPerms (+ other plugins as needed)
This allows users to prevent any of the following transformations:
- Creeper charging
- Villager infected by zombie villagers
- Villager being cured
- Villagers turning into witches
- Pigs turning into zombie pigmen
- Zombies turning into Drowned (and husks turning into Zombies)
- Mooshrooms switching colors
Configurations are in a new subsection, `protect.prevent.transformation`. All options are disabled by default.
---
* Allow for control of transformations
* Undid removal of villager checking
* Undid removal of villager checking
* Documentation for transformation configs
Co-Authored-By: md678685 <1917406+md678685@users.noreply.github.com>
* Removed duplicate configuration lines
* Updated info about husks drowning
* Changed config names
Co-authored-by: md678685 <1917406+md678685@users.noreply.github.com>
Basically, I just needed this for one of my plugins; otherwise, this could be useful for people using this event who want to see where the user's balance is being updated from.
---
* Add UserBalanceUpdateEvent.Cause
* Add special cause enum
* Add API Cause
* Compile against 1.15
* Remove achievement related methods for OfflinePlayer
* Add 1.15 to VersionUtil
* Revert "Remove achievement related methods for OfflinePlayer"
This reverts commit d0ab84e0
* Add 1.15 Mobs
* Remove Achievement related methods from OfflinePlayer
This needs more work as this currently breaks > 1.15 support
* Actually this isn't a problem
This reimplements the `spawn-if-no-home` config option from the original Essentials plugin. If set to true, running `/home` without having set a home will send the player to spawn (previous behaviour). If set to false, running `/home` will instead show an error message and not teleport the player anywhere.
Closes#1452.
Closes#2550.
* Check if user has a permission to block putting X item on their head.
* Forced the material name to be lower case.
* Fixed a typo in the message.
* Updated permission node and added check to the EssentialsPlayerListener.
Just a simple config toggle for whether or not command block commands should be logged.
closes#1153, closes#162
---
* Add toggle for command block logs
* update setting name
Fixes#2301.
The kit's name was previously sanitised/lowercased when accessed but not when saved. This fixes that. ensuring the kit delay will be reported correctly.
Tested on 1.14.3 - does not appear to break existing kit delays.
# Description of #2520
This is a continuation of #2457, accidentally hit rebase and recommitted a load of commits from the 2.x log into my repo...
I've reverted the code and added the configuration option, modifying the `LocationUtil#HOLLOW_MATERIALS` as necessary when the config is loaded.
New demo: streamable.com/pm50r
```
[16:01:00 INFO]: Server version: 1.13.2-R0.1-SNAPSHOT git-Spigot-3cb9dcb-77ca7ca (MC: 1.13.2)
[16:01:00 INFO]: EssentialsX version: 2.16.1.154
[16:01:00 INFO]: Vault is not installed. Chat and permissions may not work.
```
# Description of #2457Fixes#2121.
Prior to the addition of this patch, teleporting from another world through commands such as `/spawn` and `/home` would cause players to be teleported to the surface of the water. After this patch, using the same command will correctly teleport them to the original location.
In seeing that the addition of water would cause the `HOLLOW_MATERIALS` set to be identical to the `TRANSPARENT_MATERIALS`, I have removed the latter's usage and simply added water to the former.
I'm not exactly sure if adding water to `HOLLOW_MATERIALS` is the right decision, but it fixes the issue, and I personally don't really see any point in not having water in the list. I imagine some people might use this as a way to drop players on the surface of the water, but they can fix that issue quite easily by actually going to the surface and setting the location there. I also can see that water is not necessarily a "safe" location because players can drown, but I really see no other alternative.
The only reason it works like normal in the same world is because the safe location method exempts locations in the same world as the teleporting player, and thus this check is never even performed in the first place for those players anyway.
**Demo**
```
[16:22:49 INFO]: CONSOLE issued server command: /ess version
[16:22:49 INFO]: Server version: 1.13.2-R0.1-SNAPSHOT git-Paper-"16db0e6a" (MC: 1.13.2)
[16:22:49 INFO]: EssentialsX version: 2.16.1.9
[16:22:49 INFO]: LuckPerms version: 4.3.73
[16:22:49 INFO]: Vault is not installed. Chat and permissions may not work.
```
https://streamable.com/71072
* Add tests for existing format behavior
* Replace formatting implementation
* Add permissions for individual color codes
Resolves#415
* Use format code names
* Fix escaping
* Mockito: test scope only
* Explicitly check the .magic permission
Once I switch to checking if a perm's set in the loop, the explicit check is needed for an * perm.
* Add support for removing individual colors
* Use `obfuscated` as the name for §k
`magic` is still accepted as the group name, so this is not a breaking change.
Allows items.json to specify fallback names for materials on older versions.
Additionally make non-API methods inaccessible, as they shouldn't be needed by other plugins.
* Attempts to implement #1682 - TPARequestEvent
Awaiting further feedback. I've implemented the event, and elected to send a message to the requester of the TPA when the event gets cancelled.
* Fix formatting
* Fix up l18s errors, remove todos
* Clean up for merge
* New translations messages.properties (German)
* New translations messages.properties (Romanian)
* New translations messages.properties (Korean)
* New translations messages.properties (Latvian)
* New translations messages.properties (Lithuanian)
* New translations messages.properties (Norwegian)
* New translations messages.properties (Polish)
* New translations messages.properties (Portuguese)
* New translations messages.properties (Portuguese, Brazilian)
* New translations messages.properties (Russian)
* New translations messages.properties (Italian)
* New translations messages.properties (Serbian (Cyrillic))
* New translations messages.properties (Serbian (Latin))
* New translations messages.properties (Slovak)
* New translations messages.properties (Spanish)
* New translations messages.properties (Swedish)
* New translations messages.properties (Thai)
* New translations messages.properties (Turkish)
* New translations messages.properties (Japanese)
* New translations messages.properties (Icelandic)
* New translations messages.properties (Dutch)
* New translations messages.properties (Bulgarian)
* New translations messages.properties (Vietnamese)
* New translations messages.properties (French)
* New translations messages.properties (Hungarian)
* New translations messages.properties (English, United Kingdom)
* New translations messages.properties (English, United States)
* New translations messages.properties (Basque)
* New translations messages.properties (Bosnian)
* New translations messages.properties (Chinese Simplified)
* New translations messages.properties (Hebrew)
* New translations messages.properties (Chinese Traditional)
* New translations messages.properties (Chinese Traditional, Hong Kong)
* New translations messages.properties (Croatian)
* New translations messages.properties (Czech)
* New translations messages.properties (Danish)
* New translations messages.properties (Estonian)
* New translations messages.properties (Finnish)
* New translations messages.properties (Greek)
* New translations messages.properties (Ukrainian)
* Moved comment to newline for style consistency.
* Fixed issue 2507 by checking if an enchantment is being applied.
* Added a couple newlines for readability.
* Removed faulty ifs).
Implements a check to see if the user's address is `localhost` or `127.0.0.1`, and if so return that the country is unknown.
**Edit by @md678685: fixes #2471.**
* New translations messages.properties (English, United States)
* New translations messages.properties (Russian)
* New translations messages.properties (Korean)
* New translations messages.properties (Lithuanian)
* New translations messages.properties (Polish)
* New translations messages.properties (Portuguese)
* New translations messages.properties (Portuguese, Brazilian)
* New translations messages.properties (Romanian)
* New translations messages.properties (Serbian (Cyrillic))
* New translations messages.properties (Italian)
* New translations messages.properties (Serbian (Latin))
* New translations messages.properties (Slovak)
* New translations messages.properties (Spanish)
* New translations messages.properties (Swedish)
* New translations messages.properties (Thai)
* New translations messages.properties (Turkish)
* New translations messages.properties (Ukrainian)
* New translations messages.properties (Japanese)
* New translations messages.properties (Hungarian)
* New translations messages.properties (English, United Kingdom)
* New translations messages.properties (Chinese Traditional, Hong Kong)
* New translations messages.properties (German)
* New translations messages.properties (Norwegian)
* New translations messages.properties (Bulgarian)
* New translations messages.properties (Basque)
* New translations messages.properties (Bosnian)
* New translations messages.properties (Chinese Simplified)
* New translations messages.properties (Chinese Traditional)
* New translations messages.properties (Croatian)
* New translations messages.properties (Hebrew)
* New translations messages.properties (Czech)
* New translations messages.properties (Danish)
* New translations messages.properties (Dutch)
* New translations messages.properties (Estonian)
* New translations messages.properties (Finnish)
* New translations messages.properties (French)
* New translations messages.properties (Greek)
* New translations messages.properties (Vietnamese)
Remove the (already minimal) usage of Lombok. This will ease development for people who don't already have their IDE set up for Lombok support.
It's also totally unnecessary - it took less than 60 seconds to generate the code needed to replace Lombok annotations in Jails and Spawns.
* Attempt to look up legacy items in Material enum
* Use name method when serializing ItemStacks
* Make name uppercase before looking up in Material enum
Fixed regression of unspawnable items not being marked as such, impacting the alias generation process. This fix also retains the ability to specify non-item blocks in the EssentialsX Protect material lists.
Crowdin should only use `messages.properties` as the "source" and this file will get copied to all the other language files like `messages_de.properties` for the German translation, `messages_ro.properties` for the Romanian translation etc.
I've added a new script at `scripts/buildtools.sh` that is responsible for:
* Checking whether CraftBukkit 1.8 and 1.8.3 are already available in the local Maven repo
* Downloading BuildTools if not already present
* Running BuildTools if necessary
This improves Travis build times as it now doesn't run BuildTools twice for *every single build*, instead running it only if the Travis cache fails and CraftBukkit is missing for some other reason.
* Add spawn eggs aliases
* Add new aliases for several items and blocks like beetroot, pumpkins and crafting tables
* Remove `WALL_` materials (these are unspawnable)
I've made several improvements to the README, including:
* Overall rewording to make phrasing feel less awkward
* Added links to Patreon
* More consistent images for links at top
* Consolidated "Why you should use it" and "Other info" into "Why use EssentialsX?"
* More specific about version support
* Moved "Support" section above "Building" and added explanation
* Removed redundant "Commit Guidelines" section
- It has been totally ignored for years, and it doesn't make much sense to keep it
* Added a new "Contributing" section near the bottom
* Improving
I found some stuff to improve the translation. I'm not done yet but i think it's ready to get an eye on it.
Hope it will be used :)
Greets Sprungente/enterih
* mistake^^
^
* Part 2
Adding more Improvements
Hope it helps other serverowners^^
* Part 2 fixes
* Part 3
Notice for me
a-d finished
\u00f6 ö \u00e4 ä \u00fc ü
* Part 4
Notice for me
a-i finished
\u00f6 ö \u00e4 ä \u00fc ü
* Last part
is line 456
requiredBukkit=\u00a76* \! * Du brauchst mindestens CraftBukkit Build \#{0}, lade es von http\://dl.bukkit.org/downloads/craftbukkit/
still exist? If yes, could a reference to spigot be added?
It's ready to merge. Can i take care on it in the future?
* small polishing
* Update messages_de.properties
* Update messages_de.properties
* Adding new strings
added strings from #2278
Prevents a user's nickname from appearing if they are hidden, if `hide-displayname-in-vanish: true` in the config. Closes#2221.
* Does not return display name if user is hidden
* Added hide-displayname-in-vanish field
* Added hideDisplayNameInVanish()
* Changed to only hide display name if specified in config
* Changed hideDisplayNameInVanish to default to false if not specified in config.yml
Add `force-enable-recipe`, which allows server admins to manually enable `/recipe` despite potential duplication exploits. Use this at your own risk!
Related: #1397
* Adding EssentialsWarpEvent for checking if player is wrapping
* Spacing
* Adding Trade parameter
* Refactoring
* Adding #setWarp() to the Event
* Spacing
* Documenting the purpose of the Event
* Javadoc?
Pretty much what the title says. Closes#1630.
This is a fun little feature that I'm sure many people have always wanted. I can understand that the original authors of Essentials were probably concerned about users entering names that cannot display correctly in the chat, and that is understandable.
I have added a new permission "essentials.nick.allowunsafe", which must be given to anyone who is allowed to use characters outside of the alphanumeric set. The name of the permission is inspired from "essentials.enchantments.allowunsafe", which allows unsafe enchantment levels to be applied to items without guaranteed behaviour. Similarly, the permission "essentials.nick.allowunsafe" allows unsafe characters to be entered for the user's nickname without making any guarantee that those characters will show up in chat correctly.
Allows players to send broadcasts to a specified world by running `/broadcastworld [world] <message>` if enabled.
This is disabled by default in old configs to avoid confusion between updates.
Adds debug logging for `getChatFormat` and `getCommandCooldownEntry`, which makes it much easier to track down issues with group formats in EssentialsX Chat and command cooldowns respectively.
This PR fixes the `unbreakable` attribute on kit items. Previously, Essentials was exclusively using an internal Spigot method to set this on `ItemMeta` objects; however, this solution seems to be non-functional on more recent Spigot builds (1.12.2).
I have altered the `MetaItemStack#setUnbreakable` method to use the native Bukkit method, available for [some time now](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/d986a3f), by default. Essentials will still use the old solution as a fallback in case of an older Bukkit version which does not have native support for the attribute.
None of these economy plugins are supported any more, and removing these allows EssentialsX to be used as a dependency without locally `mvn install`ing the plugin.
If `compass-towards-home-perm` is enabled in the EssentialsX config, then the permission `essentials.home.compass` is checked before changing the player's compass target.
Closes#1918.
* Add permission to bypass other's msgtoggle
Also thanks to MD for helping me with the code :)
* Correct comment
* Remove checking for console in favour of the already existing IUser check
* Fix comments, again
* Re add isIgnoreMsg() check
Accidently removed it, sorry
* Combine 2 checks
Resolves numerous build errors that emerged in 613e852ffd and for some reason didn't cause a build error on ender.zone, but did everywhere else.
Fixes#1970
Adds world specific perms for whether a player may use /back to teleport
back to a given world. Adds logic to default
essentials.back.into.<world> permissions for loaded worlds to true to
maintain backwards compatibility.
Adds the teleport-back-when-freed-from-jail configuration option. When
set to true (default), as with previous versions will teleport the
player which was jailed back to their previous position when freed. When
false, Essentials will not teleport the player anywhere, leaving them
where they are.
Closes#1947
Fixes#1924PaperMC/Paper#884 has been fixed in recent Paper builds (1368+),
which means the workaround is no longer necessary. Disable it when
running a fixed build.
* Replace vanishedPlayers list with set
Not sure if there is any particular reason to keep it ordered, but for now I've used a LinkedHashSet.
* Change return of new method from Set to Collection
Also makes return of old method an unmodifiable list, but this is just as breaking as just changing the method return type as far as I can see
* Implemented separate permissions for seen extras
* Add an extra permission to the whois command too.
IPs are sensitive information that should only be accessible to an as small as possible amount of people
Java 9 runtimes report warnings for reflective access on JRE
classes (in this case Field.modifiers). Future versions of Java
may deny the access completely.
Since we access our own code here, we could just remove the final modifier.
With it's current visibility (of private) it's unlikely that it will be
modified from somewhere else except our Settings class.
* Lombok: Older version resulted in NoSuchFieldEx: pid (fixed since 1.16.8)
* JDK9 no longer has a tools.jar because of it's modular system, but ant is
no longer required. It was introduced in 3e9a2377a8
for GroupManager. Now GM is no longer maintained and removed in
* 5ca02e6596 (calling the build.xml)
* fa0bbde236 (removing the remaining module)
Fixes#1637
/mail stripped colors from the entire message before as reported by the issue. The desired fix was to only strip the color from the sent message rather than from the entire message format (e.g. prefixes coming before the message itself).
Fixed by formatting only the message before passing it to the localization.
Also had a minor issue with FormatUtil in which it failed to strip ampersand (&)-formatted color codes, which was amended by stripping both VANILLA_*_PATTERN as well as REPLACE_*_PATTERN in FormatUtil#formatString(...). It's not necessary to actualy strip any vanilla (i.e. section-prefixed) color codes since that's already done by FormatUtil#stripFormat(String), but I'd like to keep the changes as non-invasive as possible at the current moment.
Demo: git-Spigot-d20369f-7fc5cd8 (MC: 1.9) (Implementing API version 1.9-R0.1-SNAPSHOT)
https://streamable.com/umyi8
This is my first time contributing so please be gentle :)
Still a lot of work to do. One thing to note is that I used LEGACY materials in a few spots where I didn't know what the new ones are as I'm not very familiar with the 1.13 update and what it changes.
* Move kits to kits.yml
We will now use a separate kits.yml file.
Any kits that were defined in the config.yml will be migrated over to the kits.yml file automatically on startup.
People weren't reading them when they were at the bottom, so they have been moved to the top to encourage people to read them. This has the tradeoff of filling up the Discord webhook embed, so I've added another instruction that doubles as proof of reading the instructions.
Issue was a NullPointerException due to senderUser not being null-checked. I opted to place the couple of lines of code into the sender.isPlayer() check as opposed to null-checking.
Resolves#1725 and provides a less breaking fix for #1722.
----
Revert "Consume everything after lore as lore in MetaItemStack. Fixes #1722."
This reverts commit 5fa2ce7d9e.
Outputs a different message with the expiry included.
Add unlocalised tempbanJoin to locale files
Outputs a different message with the expiry included.
The custom text may not parse properly if the quotes are missing. By adding them to the default config, just like on lines `443` & `447`, it will discourage making the typo by mistake.
Fixes#1631 properly.
e7ebc94a9e added a workaround to the
SnakeYAML constructor to avoid errors when unknown properties are
used in the storage files. Back then, it was necessary to copy the
method to catch the exception thrown when an unknown property was
encountered.
However, SnakeYAML 1.12 (included in Spigot 1.6.2+) added a method
to ignore missing properties without overriding parts of the
SnakeYAML implementation.
Delete the old workaround and make use of
PropertyUtils.setSkipMissingProperties(true) to achieve the same
effect.
player. The form of the mute is /mute [Player] [Time] [Reason] or /mute
[Player] [Reason] or /mute [Player] [Time] or /mute [Player]. These are
the various forms of the mute command and acts exactly like the old
command just with a reason.
The final adjustments to the MuteReason
* Add spawn-join-listener-priority setting
* Make "none" an option for priority settings
* Register each listener with separate priorities
* Add note to spawn-join-listener priority
Warns about effect on spawn-on-join
This is forcefully placed at the beginning of the formatted currency because of how `currency` message is customisable. Until a better solution arises this shall stay.
* [Fix] Essentials signs validity
Any sign in the format of &1[...] was a valid sign according to essentials, but 3rd party plugins with the same sign format would be treated equally (cancelling nearby explosions, etc)
Valid signs after this fix are:
- In the format of &1[...] as before
- Are essentials signs and enabled in the essentials config
* Revert "[Fix] Essentials signs validity"
This reverts commit 60d95b6585.
* [Fix - v2] Essentials signs validity
Any sign in the format of &1[...] was a valid sign according to essentials, but 3rd party plugins with the same sign format would be treated equally (cancelling nearby explosions, etc)
* Add UUID to /whois
* Add untranslated English messages
I'm not sure whether "UUID" necessarily needs translating for most languages, but I've put it in all of them so that they can be translated if needed.
* Hi there o/
See #1356 for more information.
This change was made with the confident presumption that the use of built-in EssentialsX permissions is very very low compared to those who use feature-complete permission plugins.
I'm in the process of writing a permissions plugin, and every time I try to talk it threw an error. The error was caused by this null value that was existing. I removed it and changed it to get the Player's world name. This should fix my error.
Prior to this commit `/condense` would return the first best item to condense an ItemStack into, with no consideration of better forms of condensation.
This commit adds a local variable `bestRecipes` which stores all the valid recipes and sorts through them for the best, then picks out the best. The best recipe is defined by a compare(o2, o1) where o1 and o2 are integers of the SimpleRecipe's input ItemStack amount.
If the signFormatSuccess message is empty an error occurs silently that prevents the sign from being created from Essentials behalf. This commit tackles that issue by creating `getSuccessName(IEssentials)` and invoking it where possible to notify the console when this error occurs.
* Replace mcstats with bStats
Won't show up on the bStats website, until @drtshock or someone else signs up and creates a Bukkit plugin named "EssentialsX" on the bStats website. If you want to test, you can change `pluginName` to `"EssXmdtest"`, or any other value as desired.
* Add missing enable and disable functions to Metrics class
Won't show up on the bStats website, until @drtshock or someone else signs up and creates a Bukkit plugin named "EssentialsX" on the bStats website. If you want to test, you can change `pluginName` to `"EssXmdtest"`, or any other value as desired.
`/tpacancel` allows tp requesters to cancel sent requests before the target client can accept them. This aids in combatting long-lived tp requests in PvP environment.
`/tpacancel <player>` cancels all a tp request sent to <player> only.
This reverts commit 442d97a1b1, fcbd3deb6b, and 6231a25413.
Due to the lack of proper dependency deployment and availability users are unable to build EssentialsX without doing some manual installations. Until issue is resolved Supervisor support is dropped.
EssentialsReportContext provides all online players' userdata files if report level is 400 or higher, as well as config.yml if report level is over 200.
- Dropped usage of deprecated methods for a cleaner future.
- Zombies no longer throw errors in SpawnMob due to setVillager(false).
- Removed MobData where they have been replaced with actual entities.
- Support new enchantments.
- Support new mobs.
- Rename MobData WHITHER_SKELETON to WITHER_SKELETON.
- implement NOOP methods of new API methods for fake classes.
- Amend item dictionary.
This commit adds two new configurable options:
- `add-prefix-in-playerlist`: enable prefix in playerlist
- `add-suffix-in-playerlist`: enable suffix in playerlist
These were added to prevent very long names in the playerlist.
This commit adds a getAfkSince() method to IUser.
This commit adds a whoisAFKSince message which is sent when a player is AFK, it follows the same format as whoisAFK which is still used. whoisAFK remains unchanged but is sent only when the player is not AFK.
Admins can now specify whether all joining players should be teleported to the user's group spawn when joining the server. Players can be assigned the essentials.spawn-on-join.exempt permission to become exempt from this feature.
This commit enables users of different countries around the world to configure currency formatting displayed to users in a familiar manner.
Prior to this commit US formatting (symbols) was forced upon users. This is now configurable via locale values e.g. en-US, de, fr-ch.
This commit adds two new configurations:
- currency-format
- currency-symbol-format-locale
One method ISettings#getCurrencyFormat()
This commit makes it possible for players to set an afk message to detail their reasoning for being away to other players. This can be especially useful for the /msg command; instead of replying the user is afk, it will specify why they are afk so the sender can act further on that information.
Two methods have been added to IUser: getAfkMessage() and setAFKMessage(String).
All locale files have two new messages: userAFKWithReason and userIsAwayWithReason. They all use the messages that do not have the suffix WithReason, i.e. userAFK and userIsAway. Furthermore, the userIsAwayWithReason will not utilise the second parameter, the reason, to prevent spam and unnecessary text in global chat. However, the second parameter ({1}) is available for use in userIsAwayWithReason. userAFKWithReason, which is sent to /msg senders, does use the {1} as it controllable spam by the command sender themselves.
/afk usage is now: /afk [player/message...]
Prior to this commit, BlockPistonRetractEvent#getRetractLocation() was being used, which is now deprecated after 4 years of when this code was written.
This has been bothering me and my staff forever, it's just that there's an extra number 6 in front of the word "entities" in the German translation of /mem. This commit fixes that issue by prepending that with a section sign so it gets correctly interpreted as color code.
Add two new locale messages: timeSetWorldPermission and timeSetAllPermission.
Add two new permissions essentials.time.set.all and essentials.time.set.<world>.
As @supaham pointed out, this can cause issues with giving a player a wildcard permission and then negating the specific node if both nodes aren't negated.
This fixes the case where players had socialspy enabled, lost the permission for it (got demoted) and then someone had to manually check and disable it for them as described in #299.
I downloaded a newer version from crowdin, compared it with this one, translated additional strings and fixed some old mistakes and inconsistencies in German word choice.
Add translatable message recentlyForeverAlone.
Add behaviour that preserves reply-recipient only if they are reachable, and update reply-recipient if they are not reachable.
Fixes#248
This commit adds a new boolean-configurable feature called last-message-reply-recipient, defaults to true for new installs and false for old installs, which states whether to use the new messaging functionality or not.
This commit deprecates Console#getCommandSender(Server) and provides Console#getInstance()#getCommandSender() for future usability.
We'll use the VaultAPI if it's there for group checks.
This will also allow us to default to Player#hasPermission from Bukkit instead of going through each permission plugin.
Sticky pistons could break signs that were mounted on blocks the pistons were retracting.
This patch extends the protection from just the piston base to include the extended piston arm and the block at the end of the piston arm as well.
This method will very likely need to be changed again when 1.8 comes out, but this should bring us a bit closer, by wrapping the block tests in a loop.
* Add a method for backwards compatability with unmapped code.
* Convert all getOnlinePlayers() calls to use this method, part of the IEssentials interface
* Add a new method getOnlineUsers() Ljava/lang/Iterable;
* Convert appropriate calls to use this method
* Update Bukkit to #1945
* Update CraftBukkit to #3103
# Setting to false means EssentialsAntiBuild will never prevent you from using.
->
# Setting to false means EssentialsAntiBuild will never prevent you from using items.
Am I glad to make such a profoud change to the source code.
List users that you ignore when no arguments are given. Otherwise state
that no players are ignored.
Don't allow users to tpa or tpahere themself. This is a problem with
people "glitching" with how essentials finds a safe location to get
inside of places they shouldn't.
It is very difficult to handle an Exception thrown by an API method when you don't have any way to **programatically** (without dirty stuff like string comparisons, so the message is not enough) distinguish errors and find out what's going on.
[Fix] Move all potion effect perms to: essentials.potions.<effect>
[Fix] Move multiple potion perm to: essentials.potions.multiple
Other perms: essentials.itemspawn.meta-(firework|firework-multiple|firework-power|name|lore|head|book|chapter|chapter-<chapter>|author|title)
add new messages to messages.properties
add new messages to messages_en.properties
add new messages to messages_cs.properties
add new messages to messages_da.properties
add new messages to messages_de.properties
add new messages to messages_es.properties
add new messages to messages_fi.properties
add new messages to messages_fr.properties
add new messages to messages_it.properties
add new messages to messages_nl.properties
add new messages to messages_pl.properties
add new messages to messages_pt.properties
add new messages to messages_se.properties
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
remove color from bedNull
Change enchant command to store the enchantment instead of applying it when used on an Enchanted Book. If an enchantment is already present, replace it (only one allowed on Enchanted Books).
Spawnmob sign nolonger calls Command
Spawnmob other, now spawns at targets feet, rather than where the target is looking
Console can now spawnmob other
This does not effect the '/home' command when used with no arguments.
In this case, a player will still be sent to the bed home, if they have no Ess home set.
Removed deprecated 'restricted-commands' section.
Deprecated 'superperms' toggle.
Remove op override on essentials permissions.
Give op's all permissions by default via superperms.
New permissions:
essentials.speed = access to the command
essentials.speed.others = ability to change the speed of another player
essentials.speed.bypass = override max speed limits in config.yml
New config options:
max-fly-speed
max-walk-speed
This command lets you look inside your or another players enderchest
New Permissions:
essentials.enderchest - Access to the command
essentials.enderchest.others - Lets you look at other enderchests
essentials.enderchest.modify - Lets you modify other enderchests
New permissions:
essentials.build - same as build: true
essentials.build.interact.<id> - whitelist single interact block
essentials.build.place.<id> - whitelist single place block
essentials.build.break.<id> - whitelist single break block
essentials.build.use.<id> - whitelist single use item
description:Update EssentialsX for a new Minecraft version. Use when the user asks to update to, bump, or support a new Minecraft or Paper version (for example "update to 26.4", "add 26.3 mobs", "bump supported version"), or asks what must be checked for new mobs, items, wood types, armor, enchantments, potions, or Bukkit API changes.
---
# Minecraft update
This checklist comes from every Minecraft update PR from 1.14 to 26.3, and from the fix PRs that followed them.
Paths are relative to the repository root. `ESS` means `Essentials/src/main/java/com/earth2me/essentials`.
## Procedure
1. Find the old and new `paper-api` jars in `~/.gradle/caches/modules-2/files-2.1/io.papermc.paper/paper-api/`. If the new jar is not there, set `paperVersion` in `build-logic/src/main/kotlin/essentials.base-conventions.gradle.kts` and run `./gradlew :EssentialsX:compileJava` to download it.
2. Diff the constants of these classes between the two jars: `org.bukkit.entity.EntityType`, `org.bukkit.Material`, `org.bukkit.enchantments.Enchantment`, `org.bukkit.potion.PotionEffectType`, `org.bukkit.potion.PotionType`, `org.bukkit.TreeType`, and each `*$Variant` class under `org.bukkit.entity`. Use this command for each class:
3. Sort each added, removed, or renamed constant into a section of part 2 or part 3 below.
4. Do part 1. Then do each section that applies.
5. Apply part 4 to every line you write.
6. Run `./gradlew :EssentialsX:compileJava`. Fix errors.
7. Do not commit unless the user asks.
8. Report per section: what changed, and what you skipped and why.
---
## 1. Every update
### 1.1 Version constants
1. Open `ESS/utils/VersionUtil.java`.
2. Add a constant `vXX_Y_R01 = BukkitVersion.fromString("XX.Y-R0.1-SNAPSHOT")`.
- For a patch release, change the string of the existing minor constant. Example: `v26_1_R01` holds `26.1.2`.
- For a minor release, add a new constant. Do not rename or delete an old constant. Old constants gate features. Deleting `v1_20_4_R01` caused #6460.
3. Add the constant to `supportedVersions`. Keep the `ImmutableSet.of(...)` syntax. `build-logic/src/main/kotlin/VersionDataTask.kt` parses it with a regex.
4. Start a server. Confirm `BukkitVersion.fromString(Bukkit.getBukkitVersion())` parses. Spigot 1.14.3 and Paper 26.1 both changed the string format.
### 1.2 Documentation
1. Update the supported versions sentence in `README.md`.
2. Regenerate `items.json` with ItemDbGenerator.
---
## 2. New content
### 2.1 New mob
1. Add an entry to `ESS/Mob.java`: `NAME("CamelName", Enemies.X, "ENTITY_TYPE")`.
- Use the string constructor. Do not use `EntityType.X`. The constant does not exist on old servers.
- Set the plural suffix if it is not `s`. Fish use `""`. Fox uses `es`.
- The display name must not contain a space.
- Boats and rafts are also `Mob` entries.
2. Add `EntityType` constant to `ESS/MobCompat.java` only if `MobData` needs it.
3. Add the mob to `protect.prevent.spawn` in `Essentials/src/main/resources/config.yml`.
4. Check `entityToDisplayName` in `providers/BaseProviders/.../SpawnerItemProvider.java` if the enum name does not title-case well.
### 2.2 New mob variant or data
1. Add entries to `ESS/MobData.java`. Use the string form `"kind:VARIANT"`. Example: `"wolf:PALE"`.
2. Add a `case "kind":` to the `setData` switch.
3. Add `setKindVariant(Entity, String)` to `MobCompat.java`. Gate it with `VersionUtil.getServerBukkitVersion().isLowerThan(vXX_Y_R01)`.
4. Use `RegistryUtil.valueOf(Variant.class, name)` for registry types. Do not use `Enum.valueOf`.
5. Do not call `NewClass.Variant.values()` in an enum initializer. Axolotl did this. It threw `NoClassDefFoundError` on 1.16 (#4376).
6. Catch `Throwable` around reflective lookups. Cow variant threw NPE on old servers (#6121).
7. For a boolean flag, add a `Data` constant and a branch in `setData`. Example: `GOAT_SCREAMING`.
### 2.3 New rideable or saddle mob
1. Add `SADDLE_<MOB>` to `MobData.java` with a `Data.<MOB>SADDLE` constant.
2. Add `set<Mob>Saddle(Entity, Player)` to `MobCompat.java`. Tame the mob. Set the owner. Set the saddle.
3. Check `ESS/craftbukkit/Inventories.java` if the mob adds a player inventory slot. Body and saddle slots (41, 42) broke `/clearinventory` in 1.21.6 (#6218).
### 2.4 New item or block
1. Check each `MaterialUtil` set that lists names by hand. See table.
2. Check `ESS/utils/LocationUtil.java`:
- Add a block that hurts a standing player to `DAMAGING_TYPES`. Magma, campfire, berry bush and wither rose were missed for 2 years (#3537).
- `HOLLOW_MATERIALS` comes from `Material.isTransparent()`. Add a passable block that is not transparent. Example: `LIGHT` (#4601). Remove a transparent block that is solid. Examples: `BARRIER`, `DIRT_PATH`, `FARMLAND`.
3. Check for a new event that reveals player position. Sculk sensor needed vanish handling in `EssentialsPlayerListener` (#5262).
| `ESS/utils/MaterialUtil.java` set | Add when |
|---|---|
| `HELMETS`, `CHESTPLATES`, `LEGGINGS`, `BOOTS` | New armor tier |
| `LEATHER_ARMOR` | New dyeable armor |
| `BEDS` | New bed. `STRAW_BED` in 26.3. |
| `BANNERS` | New banner colour |
| `SIGN_POSTS`, `WALL_SIGNS`, `HANGING_SIGNS`, `HANGING_WALL_SIGNS` | New wood type |
| `MOB_HEADS` | New head. `PIGLIN_HEAD` in 1.20. |
| `POTIONS` | New potion container |
| `EDITABLE_BOOKS` | New book type |
| `FIREWORKS`, `FIREWORK_CHARGE` | New firework item |
`EnumUtil.getAllMatching` skips a name that does not exist. Adding a name is safe on old servers.
### 2.5 Renamed item, block or entity
1. Grep `ESS` for `Material.OLD_NAME` and `EntityType.OLD_NAME`. Replace with `EnumUtil.getMaterial("NEW", "OLD")` or a `MobCompat` constant. `EntityType.PIG_ZOMBIE` in a static map broke 1.16 (#3412). `EntityType.FIREWORK` broke `/firework` in 1.20.6.
2. For a renamed `EntityType`, add `getEntityType("NEW", "OLD")` to `MobCompat.java`. Update `Mob.java`, `MobData.java` and `SpawnMob.java`.
### 2.6 New wood type
1. Add `<WOOD>_SIGN`, `<WOOD>_WALL_SIGN`, `<WOOD>_HANGING_SIGN`, `<WOOD>_WALL_HANGING_SIGN` to the four sign sets in `MaterialUtil.java`. Crimson and warped were missed in 1.16 (#3487).
2. Add `<WOOD>_BOAT` to `Mob.java`. Boats are separate entity types since 1.21.3.
3. Add `<WOOD>` to `MobCompat.BoatVariant` for servers before 1.21.3.
4. Add `<WOOD>_BOAT` to `MobData.java`.
5. Add `<WOOD>_CHEST_BOAT` to `Mob.java`.
### 2.7 New tree type
1. `Commandtree` reads `TreeType.values()`. It needs no code change.
2. Add the name to `treeCommandUsage` and `treeCommandUsage1` in `messages.properties`.
3. `Commandbigtree` has four hard-coded types. Add a case if the tree has a big variant.
4. Bukkit adds `TreeType` late. 26.3-pre-2 has no `POPLAR`.
### 2.8 New armor tier
1. Add the four pieces to `HELMETS`, `CHESTPLATES`, `LEGGINGS`, `BOOTS` in `MaterialUtil.java`.
2. Add a branch to the armor keyword chain in `ESS/SpawnMob.java`. The chain has `netherite`, `copper`, `diamond`, `gold`, `leather`, `iron`.
3. For horse armor, add `<TIER>_HORSE_ARMOR` to `MobData.java`. Example: `NETHERITE_HORSE_ARMOR`.
### 2.9 New enchantment
1. Add a `try { // XX.Y }` block to `ESS/Enchantments.java`.
2. Look up by name: `Enchantment.getByName("NAME")`. Check for null. Do not use `Enchantment.NAME`.
3. Add `ENCHANTMENTS.put("name", e)` and `ALIASENCHANTMENTS.put("alias", e)`.
4. Swift sneak (1.19) and lunge (1.21.11) were missed. Contributors added them months later.
5. Display and permission names come from `Enchantments.getRealName()`. It uses the key on 1.13+.
### 2.10 New potion effect or potion type
1. Add a `try { // XX.Y }` block to `ESS/Potions.java`. Catch `Throwable`.
2. Add `POTIONS.put("name", PotionEffectType.NAME)` and `ALIASPOTIONS.put(...)`.
3. `ModernPotionMetaProvider` maps `LONG_` and `STRONG_` prefixes. Check a new potion follows that pattern.
### 2.11 New banner pattern
No code change. `PatternTypeProvider` reads the registry.
### 2.12 New colour family
Check `MaterialUtil.getColorOf` for a colour name that is not a `DyeColor`.
### 2.13 New spawn egg
No code change. `FlatSpawnEggProvider` derives the egg from `EntityType.name() + "_SPAWN_EGG"`.
### 2.14 New command for new content
1. Gate the command with `VersionUtil`. Return `tl("unsupportedFeature")` on old servers. Examples: `/beezooka`, `/ice`.
2. Add the command to `plugin.yml` and `messages.properties`. Check message parameters. `iceOther` shipped without `{0}`.
---
## 3. API changes
### 3.1 Enum becomes a registry
Enchantment, PotionEffectType, Sound, PatternType, Villager.Profession, Cat.Type, Biome and Boat.Type all changed.
1. Replace `EnumUtil.valueOf` with `RegistryUtil.valueOf(Class, names...)`. Replace `.values()` with `RegistryUtil.values(Class)`.
2. If a static method moved from an enum to an interface, code compiled against the new API throws `IncompatibleClassChangeError` on old servers. `catch (Exception)` does not catch it. `PatternType.getByIdentifier` did this (#6553).
3. For such a case, add a provider pair:
- Interface in `providers/BaseProviders/src/main/java/net/ess3/provider/`.
- `Modern*Provider` in BaseProviders with `@ProviderData(weight = 1)` and a `@ProviderTest`.
- `Legacy*Provider` in `providers/1_12Provider` or `providers/1_8Provider`. These compile against the old API.
- Register with `providerFactory.registerProvider(Legacy.class, Modern.class)` in `Essentials.java`.
4. In a `@ProviderTest`, use `getMethod`, not `getDeclaredMethod`. 1.21 moved spawner methods to a super-interface (80bdc5269).
### 3.2 Removed API class
`PotionData`, `Potion`, `BannerMeta.setBaseColor` and `Achievement` were removed.
1. Move code that uses the removed class to a provider in `1_12Provider` or `1_8Provider`.
2. Add a modern provider in BaseProviders.
3. Remove the method from `OfflinePlayer`, `FakeWorld` and `FakeServer` if it was an override.
### 3.3 Changed method signature
1. Read the Bukkit diff for changed return types on methods EssentialsX calls.
2. A changed return type changes the call descriptor. The call throws `NoSuchMethodError` on old servers. `PlayerPickupArrowEvent#getArrow` did this (#3175). `InventoryView` becoming an interface did this (#5851).
3. Use a provider or reflection for the changed call.
### 3.4 New API methods on Player, World, Server
1. Add stubs to `providers/1_8Provider/.../OfflinePlayer.java` and `providers/1_12Provider/.../FakeWorld.java` if they fail to compile.
2. Tests use MockBukkit since 1.21.6. `FakeServer` no longer needs updates.
### 3.5 New event
1. Put the handler in a separate `*Listener_XX_Y` class.
2. Register it behind a `VersionUtil` check or `Class.forName`.
3. Do not put a new event in a listener that loads on old servers. `EntityTransformEvent` failed on 1.13.1 (#2942).
### 3.6 Spigot NMS obfuscation
1. Add `VXX_Y_RN` to `providers/NMSReflectionProvider/.../ReflUtil.java` if Spigot bumps the NMS revision.
2. Update the obfuscated `MinecraftServer#isRunning` name table in `ReflServerStateProvider.java`. This broke on 1.18, 1.19, 1.19.3, 1.20.6 and 1.21.10.
3. Paper uses `PaperServerStateProvider`. Test on Spigot to see this fail.
### 3.7 Paper internal classes
Paper config classes move. `ReflOnlineModeProvider` broke on 1.19 when config moved to `io.papermc.paper.configuration.GlobalConfiguration`. Check every reflective Paper access.
### 3.8 World height
1. Do not hard-code `0`, `-1`, `128` or `256` as a Y bound.
2. Use `WorldInfoProvider.getMinHeight`, `getMaxHeight` and `getLogicalHeight`.
3. Grep `LocationUtil`, `RandomTeleport`, `Commandtop`, `Commandsethome`, `Teleport`, `AsyncTeleport` and `SpawnMob`. 1.18 needed three fix PRs (#4657, #4667, #4715).
### 3.9 Item data components
1. Check `MetaItemStack.parseStringMeta`. The `[...]` component branch calls `UnsafeValues#modifyItemStack`. Its argument shape changed in 1.20.5 and again in 26.1 (#6570).
2. Check `Commandbook`. Writable and written books have separate meta since 1.20.6 (#6064).
3. Check `Commandskull`. Skull owner needs a resolved profile since 1.20.4 (#6188).
4. Check `MetaItemStack.canSpawn()`.
### 3.10 Vanilla messages
Check the vanilla changelog for a new client message that duplicates an EssentialsX message. 1.15 added "Respawn point set". `EssentialsPlayerListener` now gates `bedSet` (#2943).
### 3.11 Version string format
1. `BukkitVersion.VERSION_PATTERN` in `VersionUtil.java` must parse the new string.
3. `compareDevSpecifier` orders `snapshot < pre < rc < release`.
4. `isSupportedVersion` compares major, minor and patch. A patch release needs a constant change.
5. 26.1 needed four fix PRs for this (#6480, #6483, #6500, #6501).
### 3.12 Adventure and Paper native paths
Each Paper API shift produced a gate:
- `Essentials.initAdventureFacet` gates the Paper facet at `v1_18_2_R01` (#6562).
- `EssentialsSpawnPlayerListener` gates `getRespawnLocation` at `v1_20_4_R01` (#6460).
- `EssentialsPlayerListener` gates configuration events at `v1_21_8_R01`.
Check each gate against the new version.
---
## 4. Compatibility rules
EssentialsX runs on 1.8.8 through the current version. Every update PR must keep that.
1. Do not reference a new `Material`, `EntityType`, `Enchantment` or `PotionEffectType` constant in a static field or enum initializer. Use `EnumUtil.getMaterial`, `EnumUtil.getEntityType` or a name lookup.
2. Catch `Throwable`, not `Exception`, around reflective lookups and provider selection. A swallowed `NoSuchFieldError` selected the wrong provider (7d6195375).
3. Use only Guava and Gson methods that exist in 1.8.8. `Ints.constrainToRange` and `JsonArray#add(String)` do not (#4708, 576866540).
4. Compile legacy providers in `1_8Provider` or `1_12Provider`. Code compiled against the new API can carry the wrong bytecode.
5. Gate with `isLowerThan(<next major>)`, not `isLowerThanOrEqualTo(<patch>)`. Forks use nonstandard revision numbers (43eff69a2).
6. Do not delete a `VersionUtil` constant.
7. Test on Paper latest, Spigot latest, 1.12.2 and 1.8.8. Most follow-up fixes in this history came from old servers.
---
## 5. Test
1. Run `./gradlew test`.
2. Run `./gradlew runServer`.
3. Run `/ess version`. Confirm the support status is FULL.
4. Run `/spawnmob <newmob>`, `/spawnmob <mob>:<variant>`.
5. Run `/give @s <newitem>`, `/give @s minecraft:<newitem>`.
6. Run `/enchant <newenchant>`, `/potion <neweffect>`.
7. Place an EssentialsX sign on each new sign type.
8. Run `/tree <newtree>` if Bukkit has the `TreeType`.
9. Run `/kit` with the new armor. Confirm auto-equip.
10. Teleport onto each new damaging block. Confirm `/tp` refuses.
11. Repeat on Spigot for `ReflServerStateProvider`.
Thanks for taking the time to report an EssentialsX bug! Fill out the form below to provide us with info to help fix the bug.
Only use this if you're 100% sure you've found a bug and can reproduce it. If you're looking for general help with EssentialsX, try the Q&A forum or MOSS Discord server.
- type:dropdown
attributes:
label:Type of bug
description:What type of bug is this? Choose all that apply.
multiple:true
options:
- Performance issue or memory leak
- Data loss
- Exploit
- Compatibility issue
- Error in console
- Other unexpected behaviour
validations:
required:true
- type:input
attributes:
label:"`/ess dump all` output"
description:Run `/ess dump all` in the console, then copy and paste the link from the output of the command into this box. (If this command doesn't work, you should [update EssentialsX](https://essentialsx.net/downloads.html) and try again.)
validations:
required:true
- type:input
attributes:
label:Error log (if applicable)
description:If you are reporting a console error, upload any relevant log excerpts to either https://pastes.dev or https://gist.github.com, save and the paste the link in this box. If you included those files in the same paste as your startup log, paste the same link here.
about:Need help with using EssentialsX? Join the MOSS Discord server for help.
- name:EssentialsX Development Discord Server
url:https://discord.gg/CUN7qVb
about:Got questions or want to discuss changes before opening your PR? Join the EssentialsX Development Discord server. (Need help? Join MOSS instead.)
*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).*
## Submitting code changes to EssentialsX
If you're interested in submitting new code to EssentialsX, we accept changes via GitHub pull requests.
### Adding features
In general, we will only consider PRs for features if they have already been discussed with the team through
GitHub issues and discussions. Check the list of
["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)
and [feature request discussions](https://github.com/EssentialsX/Essentials/discussions/categories/ideas-and-feature-suggestions)
before you start working on your changes. If you don't see your desired feature listed,
[open a feature request](https://github.com/EssentialsX/Essentials/issues/new/choose) and wait for a response, otherwise
you may end up wasting your time on a feature that we aren't in a position to accept.
#### Keep it focused
Please try to keep feature PRs focused around one feature. Your PR should ideally contain
one feature, or a few closely-linked features. If you submit several unrelated features
in one PR, the PR will not be accepted.
### Fixing bugs
If you're opening a PR to fix a bug, please ensure a bug report has been filed - search the
for an existing report, and if you can't find a bug report,
[create one](https://github.com/EssentialsX/Essentials/issues/new/choose) before you submit your PR.
#### Unconfirmed bugs
You may find a bug report with the label `bug: unconfirmed`. This means the EssentialsX team hasn't had the time
to review the bug report yet or hasn't been able to confirm
whether the reported issue is actually a bug in EssentialsX. You can help us by following the steps in the report and
posting whether you are able to replicate this issue, ideally on the latest versions of EssentialsX and Paper. This will
help us confirm issues and prioritise PRs accordingly.
#### Upstream bugs
You may also find bug reports with the `bug: upstream` label. This label means the issue is caused by a bug in *another
project*, not EssentialsX. This includes bugs in CraftBukkit/Spigot and bugs in other plugins. It may be appropriate to
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.
### Making your changes
You'll need the following to make your changes to EssentialsX:
* A GitHub account
* [`git`](https://git-scm.com/downloads): the Git command-line tool, used to track and save your changes
* [`gh`](https://cli.github.com/): the GitHub command-line tool, used to submit your changes to EssentialsX
* Your IDE of choice - we recommend [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download)
If you're already familiar with Git, you can skip this next section.
You'll need to clone the EssentialsX repository
(`gh repo clone EssentialsX/Essentials`), then create a new branch for your work
(`cd Essentials` then `git switch -c my-cool-pr`).
You can then make changes using your IDE of choice. Follow the instructions in `README.md` to build and test your
changes.
Once you've finished, you should commit your changes (`git commit -am "My cool commit name!"`).
### Submitting your PR
*Even if you're already familiar with GitHub, you will need to follow these steps in order to submit a PR to
EssentialsX. This ensures we have the information we need to test and review your changes.*
Next, you'll need to fork EssentialsX on GitHub and push your changes to a branch on that fork. We strongly recommend
using the `gh` command-line tool for this:
* In your terminal, run `gh pr create`.
* Select either the bug fix or feature template, depending on what your PR is for.
* If you get asked `Where should we push the '...' branch?`, select `Create a fork of EssentialsX/Essentials`.
* For the title, choose a title that describes what your PR does. For example, `Add more ducks to /spawnmob`.
* For the body, press E. You will then need to fill in the PR template in your text editor.
- Follow the instructions in the template and fill out the sections as required.
- This step is important! Without it, we won't know why you've made your changes or how to test them.
* Save the file in your text editor and close it, then return to the terminal.
* Select `Submit` to open your PR.
If you follow these steps correctly, GitHub will create a fork (if necessary) and then open a PR with your changes. You
can now sit back while we review your changes. If we need to ask questions or request further changes to your code,
we will review your PR and post a comment on GitHub. You can respond to our reviews and comments on the GitHub website,
and you can push new changes using `git commit` and `git push`.
## Submitting community translations to EssentialsX
EssentialsX relies on community translations for its messages in other languages. You can help translate EssentialsX on
[Crowdin](https://translate.essentialsx.net/). You'll need a Crowdin account to translate and improve messages.
If your language isn't listed or doesn't have an active proofreader, please let us know on Discord (see below).
## Discussing EssentialsX contributions
Want to discuss something before opening a PR or translating messages? 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.
Loaded 100 of 1282 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.