mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-12 10:31:37 +01:00
Fix player items not dropping on death
By: md_5 <git@md-5.net>
This commit is contained in:
parent
9c115e8fae
commit
b7c0614c58
@ -338,7 +338,7 @@
|
|||||||
- IChatBaseComponent ichatbasecomponent = this.getCombatTracker().getDeathMessage();
|
- IChatBaseComponent ichatbasecomponent = this.getCombatTracker().getDeathMessage();
|
||||||
+ if (!keepInventory) {
|
+ if (!keepInventory) {
|
||||||
+ for (ItemStack item : this.getInventory().getContents()) {
|
+ for (ItemStack item : this.getInventory().getContents()) {
|
||||||
+ if (!item.isEmpty() && EnchantmentManager.has(item, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
|
+ if (!item.isEmpty() && !EnchantmentManager.has(item, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
|
||||||
+ loot.add(CraftItemStack.asCraftMirror(item));
|
+ loot.add(CraftItemStack.asCraftMirror(item));
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
Reference in New Issue
Block a user