mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 13:12:03 -07:00
PlayerDeathEvent#shouldDropExperience
This commit is contained in:
@@ -615,7 +615,7 @@
|
|||||||
- if (!this.isSpectator()) {
|
- if (!this.isSpectator()) {
|
||||||
- this.dropAllDeathLoot(this.serverLevel(), damageSource);
|
- this.dropAllDeathLoot(this.serverLevel(), damageSource);
|
||||||
+ // SPIGOT-5478 must be called manually now
|
+ // SPIGOT-5478 must be called manually now
|
||||||
+ this.dropExperience(this.serverLevel(), damageSource.getEntity());
|
+ if (event.shouldDropExperience()) this.dropExperience(this.serverLevel(), damageSource.getEntity()); // 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.
|
+ // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
|
||||||
+ if (!event.getKeepInventory()) {
|
+ if (!event.getKeepInventory()) {
|
||||||
+ // Paper start - PlayerDeathEvent#getItemsToKeep
|
+ // Paper start - PlayerDeathEvent#getItemsToKeep
|
||||||
|
Reference in New Issue
Block a user