mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 09:51:12 +01:00
Fixed PlayerDropItem event cancelling.
This commit is contained in:
parent
e4a2177281
commit
1e8bbbfbd5
1 changed files with 1 additions and 4 deletions
|
@ -294,10 +294,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
org.bukkit.inventory.ItemStack stack = drop.getItemStack();
|
player.getInventory().addItem(drop.getItemStack());
|
||||||
stack.setAmount(1);
|
|
||||||
player.getInventory().addItem(stack);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
Loading…
Reference in a new issue