Fix double dropping xp now that Spigot fixed it

This commit is contained in:
Zach Brown 2019-12-26 22:28:02 -05:00
parent 4b04144770
commit 24f4c7016a

View file

@ -5,15 +5,16 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index f28de40a7..0888f268f 100644
index f28de40a7..1ec29f157 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
this.setSpectatorTarget(this); // Remove spectated target
+ if (event.shouldDropExperience()) this.dropExperience(); // Paper - drop experience
// CraftBukkit end
// CraftBukkit - Get our scores instead
this.releaseShoulderEntities();
// SPIGOT-5478 must be called manually now
- this.dropExperience();
+ if (event.shouldDropExperience()) this.dropExperience(); // Paper - tie to event
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {
// Paper start - replace logic
--