Skip to content

Commit 790644b

Browse files
authored
Ignore cancelled PlayerDeathEvents (#6179)
<!-- 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. -->
1 parent 334c5a4 commit 790644b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Essentials/src/main/java/com/earth2me/essentials/EssentialsEntityListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void onEntityCombustByEntity(final EntityCombustByEntityEvent event) {
156156
}
157157
}
158158

159-
@EventHandler(priority = EventPriority.LOWEST)
159+
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
160160
public void onPlayerDeathEvent(final PlayerDeathEvent event) {
161161
final Entity entity = event.getEntity();
162162
if (entity.hasMetadata("NPC")) {

0 commit comments

Comments
 (0)