mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 21:33:49 -07:00
SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/commands/CommandGive.java
|
||||
+++ b/net/minecraft/server/commands/CommandGive.java
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
if (flag && itemstack.isEmpty()) {
|
||||
itemstack.setCount(1);
|
||||
- entityitem = entityplayer.drop(itemstack, false);
|
||||
+ entityitem = entityplayer.drop(itemstack, false, false, false); // SPIGOT-2942: Add boolean to call event
|
||||
if (entityitem != null) {
|
||||
entityitem.makeFakeItem();
|
||||
}
|
Reference in New Issue
Block a user