Files
Purpur/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch
granny 7c6502dc13 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@94f29035 Do not blow up accessing unregistered memories from API (Fixes #12618) (#12639)
PaperMC/Paper@03efecf0 Do not fire PlayerDropItemEvent for /give command
PaperMC/Paper@3527ccdf feat: expose updateDemand and restock on Villager (#12608)
PaperMC/Paper@320f25cb fix sponge-absorb deleting chest content (#12647)
2025-06-08 12:55:55 -07:00

11 lines
747 B
Diff

--- a/net/minecraft/server/commands/GiveCommand.java
+++ b/net/minecraft/server/commands/GiveCommand.java
@@ -66,6 +_,7 @@
i1 -= min;
ItemStack itemStack1 = item.createItemStack(min, false);
boolean flag = serverPlayer.getInventory().add(itemStack1);
+ if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
if (flag && itemStack1.isEmpty()) {
ItemEntity itemEntity = serverPlayer.drop(itemStack, false, false, false, null); // Paper - do not fire PlayerDropItemEvent for /give command
if (itemEntity != null) {