mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01:00
SPIGOT-4556: Fix plugins closing inventory during drop events
By: md_5 <git@md-5.net>
This commit is contained in:
parent
92b2d3a400
commit
d2d0415a74
1 changed files with 14 additions and 1 deletions
|
@ -126,7 +126,20 @@
|
|||
}
|
||||
}
|
||||
} else if (inventoryclicktype == InventoryClickType.SWAP && j >= 0 && j < 9) {
|
||||
@@ -565,6 +637,7 @@
|
||||
@@ -356,8 +428,11 @@
|
||||
PlayerInventory playerinventory = entityhuman.inventory;
|
||||
|
||||
if (!playerinventory.getCarried().isEmpty()) {
|
||||
- entityhuman.drop(playerinventory.getCarried(), false);
|
||||
+ // CraftBukkit start - SPIGOT-4556
|
||||
+ ItemStack carried = playerinventory.getCarried();
|
||||
playerinventory.setCarried(ItemStack.a);
|
||||
+ entityhuman.drop(carried, false);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
@@ -565,6 +640,7 @@
|
||||
if (inventorycraftresult.a(world, entityplayer, irecipe) && irecipe != null) {
|
||||
itemstack = irecipe.craftItem(iinventory);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue